Make WebUI webview content script work with incognito.
commit6233f60f246f03cd193bd9ecebbeb314813406d8
authorhanxi <hanxi@chromium.org>
Mon, 27 Apr 2015 19:09:04 +0000 (27 12:09 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 27 Apr 2015 19:09:56 +0000 (27 19:09 +0000)
tree652428b257cc220daf3fc804982efe648769e56e
parent59f6756e6aa719a7d727ecb98456d185d1b57752
Make WebUI webview content script work with incognito.

In WebUIUserScriptLoader, if it is incognito mode, we need to get the
OffTheRecordContext and pass it to URLfetchers to load user scripts.
Currently, UserScriptLoader can only refer to regular profiles.
To fix this, we pass in a flag to show whether it is incognito mode
when adding scripts. We are able to choose the correct profile pointer
by using this flag.

BUG=461052

Review URL: https://codereview.chromium.org/1062963006

Cr-Commit-Position: refs/heads/master@{#327096}
chrome/browser/ui/webui/webui_webview_browsertest.cc
extensions/browser/web_ui_user_script_loader.cc
extensions/browser/web_ui_user_script_loader.h