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

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

Issue 2934293003: The chrome.lockScreen.data API implementation (Closed)
Patch Set: remove FilePath*UTF8Unsafe methods Created 3 years, 6 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 #ifndef EXTENSIONS_BROWSER_TEST_EXTENSIONS_BROWSER_CLIENT_H_ 5 #ifndef EXTENSIONS_BROWSER_TEST_EXTENSIONS_BROWSER_CLIENT_H_
6 #define EXTENSIONS_BROWSER_TEST_EXTENSIONS_BROWSER_CLIENT_H_ 6 #define EXTENSIONS_BROWSER_TEST_EXTENSIONS_BROWSER_CLIENT_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 #include <utility> 10 #include <utility>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/callback.h" 13 #include "base/callback.h"
13 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
16 #include "build/build_config.h" 17 #include "build/build_config.h"
17 #include "components/update_client/update_client.h" 18 #include "components/update_client/update_client.h"
(...skipping 15 matching lines...) Expand all
33 void set_process_manager_delegate(ProcessManagerDelegate* delegate) { 34 void set_process_manager_delegate(ProcessManagerDelegate* delegate) {
34 process_manager_delegate_ = delegate; 35 process_manager_delegate_ = delegate;
35 } 36 }
36 void set_extension_system_factory(ExtensionSystemProvider* factory) { 37 void set_extension_system_factory(ExtensionSystemProvider* factory) {
37 extension_system_factory_ = factory; 38 extension_system_factory_ = factory;
38 } 39 }
39 void set_extension_cache(std::unique_ptr<ExtensionCache> extension_cache) { 40 void set_extension_cache(std::unique_ptr<ExtensionCache> extension_cache) {
40 extension_cache_ = std::move(extension_cache); 41 extension_cache_ = std::move(extension_cache);
41 } 42 }
42 43
44 void set_lock_screen_context(content::BrowserContext* context) {
45 lock_screen_context_ = context;
46 }
47
43 // Sets a factory to respond to calls of the CreateUpdateClient method. 48 // Sets a factory to respond to calls of the CreateUpdateClient method.
44 void SetUpdateClientFactory( 49 void SetUpdateClientFactory(
45 const base::Callback<update_client::UpdateClient*(void)>& factory); 50 const base::Callback<update_client::UpdateClient*(void)>& factory);
46 51
47 // Associates an incognito context with |main_context_|. 52 // Associates an incognito context with |main_context_|.
48 void SetIncognitoContext(content::BrowserContext* incognito_context); 53 void SetIncognitoContext(content::BrowserContext* incognito_context);
49 54
50 // ExtensionsBrowserClient overrides: 55 // ExtensionsBrowserClient overrides:
51 bool IsShuttingDown() override; 56 bool IsShuttingDown() override;
52 bool AreExtensionsDisabled(const base::CommandLine& command_line, 57 bool AreExtensionsDisabled(const base::CommandLine& command_line,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 content::BrowserContext* context) override; 120 content::BrowserContext* context) override;
116 bool IsLockScreenContext(content::BrowserContext* context) override; 121 bool IsLockScreenContext(content::BrowserContext* context) override;
117 122
118 ExtensionSystemProvider* extension_system_factory() { 123 ExtensionSystemProvider* extension_system_factory() {
119 return extension_system_factory_; 124 return extension_system_factory_;
120 } 125 }
121 126
122 private: 127 private:
123 content::BrowserContext* main_context_; // Not owned. 128 content::BrowserContext* main_context_; // Not owned.
124 content::BrowserContext* incognito_context_; // Not owned, defaults to NULL. 129 content::BrowserContext* incognito_context_; // Not owned, defaults to NULL.
130 // Not owned, defaults to NULL.
rkc 2017/06/22 18:35:48 Either move this to the right, or move the comment
131 content::BrowserContext* lock_screen_context_;
125 132
126 // Not owned, defaults to NULL. 133 // Not owned, defaults to NULL.
127 ProcessManagerDelegate* process_manager_delegate_; 134 ProcessManagerDelegate* process_manager_delegate_;
128 135
129 // Not owned, defaults to NULL. 136 // Not owned, defaults to NULL.
130 ExtensionSystemProvider* extension_system_factory_; 137 ExtensionSystemProvider* extension_system_factory_;
131 138
132 std::unique_ptr<ExtensionCache> extension_cache_; 139 std::unique_ptr<ExtensionCache> extension_cache_;
133 140
134 base::Callback<update_client::UpdateClient*(void)> update_client_factory_; 141 base::Callback<update_client::UpdateClient*(void)> update_client_factory_;
135 142
136 DISALLOW_COPY_AND_ASSIGN(TestExtensionsBrowserClient); 143 DISALLOW_COPY_AND_ASSIGN(TestExtensionsBrowserClient);
137 }; 144 };
138 145
139 } // namespace extensions 146 } // namespace extensions
140 147
141 #endif // EXTENSIONS_BROWSER_TEST_EXTENSIONS_BROWSER_CLIENT_H_ 148 #endif // EXTENSIONS_BROWSER_TEST_EXTENSIONS_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698