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

Side by Side Diff: extensions/browser/extension_user_script_loader.h

Issue 1909773002: Convert //extensions/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef EXTENSIONS_BROWSER_EXTENSION_USER_SCRIPT_LOADER_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_USER_SCRIPT_LOADER_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_USER_SCRIPT_LOADER_H_ 6 #define EXTENSIONS_BROWSER_EXTENSION_USER_SCRIPT_LOADER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "extensions/browser/extension_registry_observer.h" 9 #include "extensions/browser/extension_registry_observer.h"
10 #include "extensions/browser/user_script_loader.h" 10 #include "extensions/browser/user_script_loader.h"
(...skipping 22 matching lines...) Expand all
33 const HostID& host_id, 33 const HostID& host_id,
34 bool listen_for_extension_system_loaded); 34 bool listen_for_extension_system_loaded);
35 ~ExtensionUserScriptLoader() override; 35 ~ExtensionUserScriptLoader() override;
36 36
37 // A wrapper around the method to load user scripts, which is normally run on 37 // A wrapper around the method to load user scripts, which is normally run on
38 // the file thread. Exposed only for tests. 38 // the file thread. Exposed only for tests.
39 void LoadScriptsForTest(UserScriptList* user_scripts); 39 void LoadScriptsForTest(UserScriptList* user_scripts);
40 40
41 private: 41 private:
42 // UserScriptLoader: 42 // UserScriptLoader:
43 void LoadScripts(scoped_ptr<UserScriptList> user_scripts, 43 void LoadScripts(std::unique_ptr<UserScriptList> user_scripts,
44 const std::set<HostID>& changed_hosts, 44 const std::set<HostID>& changed_hosts,
45 const std::set<int>& added_script_ids, 45 const std::set<int>& added_script_ids,
46 LoadScriptsCallback callback) override; 46 LoadScriptsCallback callback) override;
47 47
48 // Updates |hosts_info_| to contain info for each element of 48 // Updates |hosts_info_| to contain info for each element of
49 // |changed_hosts_|. 49 // |changed_hosts_|.
50 void UpdateHostsInfo(const std::set<HostID>& changed_hosts); 50 void UpdateHostsInfo(const std::set<HostID>& changed_hosts);
51 51
52 // ExtensionRegistryObserver: 52 // ExtensionRegistryObserver:
53 void OnExtensionUnloaded(content::BrowserContext* browser_context, 53 void OnExtensionUnloaded(content::BrowserContext* browser_context,
(...skipping 14 matching lines...) Expand all
68 extension_registry_observer_; 68 extension_registry_observer_;
69 69
70 base::WeakPtrFactory<ExtensionUserScriptLoader> weak_factory_; 70 base::WeakPtrFactory<ExtensionUserScriptLoader> weak_factory_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(ExtensionUserScriptLoader); 72 DISALLOW_COPY_AND_ASSIGN(ExtensionUserScriptLoader);
73 }; 73 };
74 74
75 } // namespace extensions 75 } // namespace extensions
76 76
77 #endif // EXTENSIONS_BROWSER_EXTENSION_USER_SCRIPT_LOADER_H_ 77 #endif // EXTENSIONS_BROWSER_EXTENSION_USER_SCRIPT_LOADER_H_
OLDNEW
« no previous file with comments | « extensions/browser/extension_throttle_unittest.cc ('k') | extensions/browser/extension_user_script_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698