Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Unified Diff: extensions/browser/declarative_user_script_manager.cc

Issue 1056133005: Make WebUI webview content script work with incognito. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webview-content-script-api-from-xi
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/declarative_user_script_manager.cc
diff --git a/extensions/browser/declarative_user_script_manager.cc b/extensions/browser/declarative_user_script_manager.cc
index 3b6c4c7a470d36bd2483a65a14bf87372dd61b81..bd26ddad689ad01a749a48c71bf4034ce8763b42 100644
--- a/extensions/browser/declarative_user_script_manager.cc
+++ b/extensions/browser/declarative_user_script_manager.cc
@@ -22,20 +22,26 @@ DeclarativeUserScriptManager::~DeclarativeUserScriptManager() {
DeclarativeUserScriptMaster*
DeclarativeUserScriptManager::GetDeclarativeUserScriptMasterByID(
const HostID& host_id) {
+ return GetDeclarativeUserScriptMasterByID(browser_context_, host_id);
+}
+
+DeclarativeUserScriptMaster*
+DeclarativeUserScriptManager::GetDeclarativeUserScriptMasterByID(
+ content::BrowserContext* browser_context, const HostID& host_id) {
UserScriptMasterMap::iterator it =
declarative_user_script_masters_.find(host_id);
if (it != declarative_user_script_masters_.end())
return it->second.get();
- return CreateDeclarativeUserScriptMaster(host_id);
+ return CreateDeclarativeUserScriptMaster(browser_context, host_id);
}
DeclarativeUserScriptMaster*
DeclarativeUserScriptManager::CreateDeclarativeUserScriptMaster(
- const HostID& host_id) {
+ content::BrowserContext* browser_context, const HostID& host_id) {
linked_ptr<DeclarativeUserScriptMaster> master(
- new DeclarativeUserScriptMaster(browser_context_, host_id));
+ new DeclarativeUserScriptMaster(browser_context, host_id));
declarative_user_script_masters_[host_id] = master;
return master.get();
}

Powered by Google App Engine
This is Rietveld 408576698