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

Unified Diff: extensions/browser/declarative_user_script_manager.cc

Issue 955473002: Move DeclarativeUserScriptManager/Master and UserScriptLoader to //extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/chrome/browser/extensions/declarative_user_script_manager.cc b/extensions/browser/declarative_user_script_manager.cc
similarity index 72%
rename from chrome/browser/extensions/declarative_user_script_manager.cc
rename to extensions/browser/declarative_user_script_manager.cc
index 2065502887f8661a2bfda30929f0e48cb1cecfec..3b6c4c7a470d36bd2483a65a14bf87372dd61b81 100644
--- a/chrome/browser/extensions/declarative_user_script_manager.cc
+++ b/extensions/browser/declarative_user_script_manager.cc
@@ -2,17 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/extensions/declarative_user_script_manager.h"
+#include "extensions/browser/declarative_user_script_manager.h"
-#include "chrome/browser/extensions/declarative_user_script_master.h"
-#include "chrome/browser/profiles/profile.h"
+#include "content/public/browser/browser_context.h"
+#include "extensions/browser/declarative_user_script_master.h"
#include "extensions/browser/extension_registry.h"
namespace extensions {
-DeclarativeUserScriptManager::DeclarativeUserScriptManager(Profile* profile)
- : profile_(profile), extension_registry_observer_(this) {
- extension_registry_observer_.Add(ExtensionRegistry::Get(profile));
+DeclarativeUserScriptManager::DeclarativeUserScriptManager(
+ content::BrowserContext* browser_context)
+ : browser_context_(browser_context), extension_registry_observer_(this) {
+ extension_registry_observer_.Add(ExtensionRegistry::Get(browser_context));
}
DeclarativeUserScriptManager::~DeclarativeUserScriptManager() {
@@ -34,7 +35,7 @@ DeclarativeUserScriptMaster*
DeclarativeUserScriptManager::CreateDeclarativeUserScriptMaster(
const HostID& host_id) {
linked_ptr<DeclarativeUserScriptMaster> master(
- new DeclarativeUserScriptMaster(profile_, host_id));
+ new DeclarativeUserScriptMaster(browser_context_, host_id));
declarative_user_script_masters_[host_id] = master;
return master.get();
}
« no previous file with comments | « extensions/browser/declarative_user_script_manager.h ('k') | extensions/browser/declarative_user_script_master.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698