| OLD | NEW |
| 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 "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "chrome/browser/extensions/extension_util.h" | |
| 9 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/common/extensions/manifest_handlers/content_scripts_handler.h" | 9 #include "chrome/common/extensions/manifest_handlers/content_scripts_handler.h" |
| 11 #include "extensions/browser/extension_registry.h" | 10 #include "extensions/browser/extension_registry.h" |
| 11 #include "extensions/browser/extension_util.h" |
| 12 #include "extensions/common/host_id.h" | 12 #include "extensions/common/host_id.h" |
| 13 | 13 |
| 14 namespace extensions { | 14 namespace extensions { |
| 15 | 15 |
| 16 SharedUserScriptMaster::SharedUserScriptMaster(Profile* profile) | 16 SharedUserScriptMaster::SharedUserScriptMaster(Profile* profile) |
| 17 : loader_(profile, | 17 : loader_(profile, |
| 18 HostID(), | 18 HostID(), |
| 19 true /* listen_for_extension_system_loaded */), | 19 true /* listen_for_extension_system_loaded */), |
| 20 profile_(profile), | 20 profile_(profile), |
| 21 extension_registry_observer_(this) { | 21 extension_registry_observer_(this) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 for (const std::unique_ptr<UserScript>& script : script_list) { | 53 for (const std::unique_ptr<UserScript>& script : script_list) { |
| 54 std::unique_ptr<UserScript> script_copy = | 54 std::unique_ptr<UserScript> script_copy = |
| 55 UserScript::CopyMetadataFrom(*script); | 55 UserScript::CopyMetadataFrom(*script); |
| 56 script_copy->set_incognito_enabled(incognito_enabled); | 56 script_copy->set_incognito_enabled(incognito_enabled); |
| 57 script_vector->push_back(std::move(script_copy)); | 57 script_vector->push_back(std::move(script_copy)); |
| 58 } | 58 } |
| 59 return script_vector; | 59 return script_vector; |
| 60 } | 60 } |
| 61 | 61 |
| 62 } // namespace extensions | 62 } // namespace extensions |
| OLD | NEW |