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

Side by Side Diff: chrome/test/base/testing_browser_process.h

Issue 2893943004: Refactor UKM interface for mojo-ification (Closed)
Patch Set: Fixed contextualsearch Created 3 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // An implementation of BrowserProcess for unit tests that fails for most 5 // An implementation of BrowserProcess for unit tests that fails for most
6 // services. By preventing creation of services, we reduce dependencies and 6 // services. By preventing creation of services, we reduce dependencies and
7 // keep the profile clean. Clients of this class must handle the NULL return 7 // keep the profile clean. Clients of this class must handle the NULL return
8 // value, however. 8 // value, however.
9 9
10 #ifndef CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ 10 #ifndef CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Convenience method to get g_browser_process as a TestingBrowserProcess*. 60 // Convenience method to get g_browser_process as a TestingBrowserProcess*.
61 static TestingBrowserProcess* GetGlobal(); 61 static TestingBrowserProcess* GetGlobal();
62 62
63 // BrowserProcess overrides: 63 // BrowserProcess overrides:
64 void ResourceDispatcherHostCreated() override; 64 void ResourceDispatcherHostCreated() override;
65 void EndSession() override; 65 void EndSession() override;
66 metrics_services_manager::MetricsServicesManager* GetMetricsServicesManager() 66 metrics_services_manager::MetricsServicesManager* GetMetricsServicesManager()
67 override; 67 override;
68 metrics::MetricsService* metrics_service() override; 68 metrics::MetricsService* metrics_service() override;
69 rappor::RapporServiceImpl* rappor_service() override; 69 rappor::RapporServiceImpl* rappor_service() override;
70 ukm::UkmService* ukm_service() override; 70 ukm::UkmRecorder* ukm_recorder() override;
71 IOThread* io_thread() override; 71 IOThread* io_thread() override;
72 WatchDogThread* watchdog_thread() override; 72 WatchDogThread* watchdog_thread() override;
73 ProfileManager* profile_manager() override; 73 ProfileManager* profile_manager() override;
74 PrefService* local_state() override; 74 PrefService* local_state() override;
75 variations::VariationsService* variations_service() override; 75 variations::VariationsService* variations_service() override;
76 policy::BrowserPolicyConnector* browser_policy_connector() override; 76 policy::BrowserPolicyConnector* browser_policy_connector() override;
77 policy::PolicyService* policy_service() override; 77 policy::PolicyService* policy_service() override;
78 IconManager* icon_manager() override; 78 IconManager* icon_manager() override;
79 GpuProfileCache* gpu_profile_cache() override; 79 GpuProfileCache* gpu_profile_cache() override;
80 GpuModeManager* gpu_mode_manager() override; 80 GpuModeManager* gpu_mode_manager() override;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 void SetSafeBrowsingService(safe_browsing::SafeBrowsingService* sb_service); 142 void SetSafeBrowsingService(safe_browsing::SafeBrowsingService* sb_service);
143 void SetRulesetService( 143 void SetRulesetService(
144 std::unique_ptr<subresource_filter::ContentRulesetService> 144 std::unique_ptr<subresource_filter::ContentRulesetService>
145 ruleset_service); 145 ruleset_service);
146 void SetSystemRequestContext(net::URLRequestContextGetter* context_getter); 146 void SetSystemRequestContext(net::URLRequestContextGetter* context_getter);
147 void SetNotificationUIManager( 147 void SetNotificationUIManager(
148 std::unique_ptr<NotificationUIManager> notification_ui_manager); 148 std::unique_ptr<NotificationUIManager> notification_ui_manager);
149 void SetNotificationPlatformBridge( 149 void SetNotificationPlatformBridge(
150 std::unique_ptr<NotificationPlatformBridge> notification_platform_bridge); 150 std::unique_ptr<NotificationPlatformBridge> notification_platform_bridge);
151 void SetRapporServiceImpl(rappor::RapporServiceImpl* rappor_service); 151 void SetRapporServiceImpl(rappor::RapporServiceImpl* rappor_service);
152 void SetUkmService(ukm::UkmService* ukm_service); 152 void SetUkmRecorder(ukm::UkmRecorder* ukm_recorder);
153 void SetShuttingDown(bool is_shutting_down); 153 void SetShuttingDown(bool is_shutting_down);
154 void ShutdownBrowserPolicyConnector(); 154 void ShutdownBrowserPolicyConnector();
155 155
156 private: 156 private:
157 // See CreateInstance() and DestoryInstance() above. 157 // See CreateInstance() and DestoryInstance() above.
158 TestingBrowserProcess(); 158 TestingBrowserProcess();
159 ~TestingBrowserProcess() override; 159 ~TestingBrowserProcess() override;
160 160
161 std::unique_ptr<content::NotificationService> notification_service_; 161 std::unique_ptr<content::NotificationService> notification_service_;
162 std::string app_locale_; 162 std::string app_locale_;
(...skipping 26 matching lines...) Expand all
189 // GetTabManager() is invoked on supported platforms. 189 // GetTabManager() is invoked on supported platforms.
190 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) 190 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
191 std::unique_ptr<memory::TabManager> tab_manager_; 191 std::unique_ptr<memory::TabManager> tab_manager_;
192 #endif 192 #endif
193 193
194 // The following objects are not owned by TestingBrowserProcess: 194 // The following objects are not owned by TestingBrowserProcess:
195 PrefService* local_state_; 195 PrefService* local_state_;
196 IOThread* io_thread_; 196 IOThread* io_thread_;
197 net::URLRequestContextGetter* system_request_context_; 197 net::URLRequestContextGetter* system_request_context_;
198 rappor::RapporServiceImpl* rappor_service_; 198 rappor::RapporServiceImpl* rappor_service_;
199 ukm::UkmService* ukm_service_; 199 ukm::UkmRecorder* ukm_recorder_;
200 200
201 std::unique_ptr<BrowserProcessPlatformPart> platform_part_; 201 std::unique_ptr<BrowserProcessPlatformPart> platform_part_;
202 202
203 #if BUILDFLAG(ENABLE_EXTENSIONS) 203 #if BUILDFLAG(ENABLE_EXTENSIONS)
204 std::unique_ptr<MediaFileSystemRegistry> media_file_system_registry_; 204 std::unique_ptr<MediaFileSystemRegistry> media_file_system_registry_;
205 205
206 std::unique_ptr<extensions::ExtensionsBrowserClient> 206 std::unique_ptr<extensions::ExtensionsBrowserClient>
207 extensions_browser_client_; 207 extensions_browser_client_;
208 #endif 208 #endif
209 209
(...skipping 17 matching lines...) Expand all
227 class TestingBrowserProcessInitializer { 227 class TestingBrowserProcessInitializer {
228 public: 228 public:
229 TestingBrowserProcessInitializer(); 229 TestingBrowserProcessInitializer();
230 ~TestingBrowserProcessInitializer(); 230 ~TestingBrowserProcessInitializer();
231 231
232 private: 232 private:
233 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer); 233 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer);
234 }; 234 };
235 235
236 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ 236 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/chrome_autofill_client.cc ('k') | chrome/test/base/testing_browser_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698