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

Side by Side Diff: chrome/browser/extensions/shared_user_script_master.cc

Issue 899983002: Revert of Introduce HostID and de-couple Extensions from "script injection System" [browser side] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/shared_user_script_master.h" 5 #include "chrome/browser/extensions/shared_user_script_master.h"
6 6
7 #include "chrome/browser/extensions/extension_util.h" 7 #include "chrome/browser/extensions/extension_util.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/extensions/manifest_handlers/content_scripts_handler.h" 9 #include "chrome/common/extensions/manifest_handlers/content_scripts_handler.h"
10 #include "extensions/browser/extension_registry.h" 10 #include "extensions/browser/extension_registry.h"
11 #include "extensions/common/host_id.h"
12 11
13 namespace extensions { 12 namespace extensions {
14 13
15 SharedUserScriptMaster::SharedUserScriptMaster(Profile* profile) 14 SharedUserScriptMaster::SharedUserScriptMaster(Profile* profile)
16 : loader_(profile, 15 : loader_(profile,
17 HostID(), 16 std::string() /* owner_extension_id */,
18 true /* listen_for_extension_system_loaded */), 17 true /* listen_for_extension_system_loaded */),
19 profile_(profile), 18 profile_(profile),
20 extension_registry_observer_(this) { 19 extension_registry_observer_(this) {
21 extension_registry_observer_.Add(ExtensionRegistry::Get(profile_)); 20 extension_registry_observer_.Add(ExtensionRegistry::Get(profile_));
22 } 21 }
23 22
24 SharedUserScriptMaster::~SharedUserScriptMaster() { 23 SharedUserScriptMaster::~SharedUserScriptMaster() {
25 } 24 }
26 25
27 void SharedUserScriptMaster::OnExtensionLoaded( 26 void SharedUserScriptMaster::OnExtensionLoaded(
(...skipping 20 matching lines...) Expand all
48 ++it) { 47 ++it) {
49 UserScript script = *it; 48 UserScript script = *it;
50 script.set_incognito_enabled(incognito_enabled); 49 script.set_incognito_enabled(incognito_enabled);
51 script_set.insert(script); 50 script_set.insert(script);
52 } 51 }
53 52
54 return script_set; 53 return script_set;
55 } 54 }
56 55
57 } // namespace extensions 56 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/shared_user_script_master.h ('k') | chrome/browser/extensions/user_script_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698