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

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

Issue 2510803003: Pass RapporService to content/browser/ (Closed)
Patch Set: Fix more compile errors in JNI files Created 4 years 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
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::RapporService* rappor_service() override; 69 rappor::RapporServiceImpl* rappor_service() override;
70 IOThread* io_thread() override; 70 IOThread* io_thread() override;
71 WatchDogThread* watchdog_thread() override; 71 WatchDogThread* watchdog_thread() override;
72 ProfileManager* profile_manager() override; 72 ProfileManager* profile_manager() override;
73 PrefService* local_state() override; 73 PrefService* local_state() override;
74 variations::VariationsService* variations_service() override; 74 variations::VariationsService* variations_service() override;
75 policy::BrowserPolicyConnector* browser_policy_connector() override; 75 policy::BrowserPolicyConnector* browser_policy_connector() override;
76 policy::PolicyService* policy_service() override; 76 policy::PolicyService* policy_service() override;
77 IconManager* icon_manager() override; 77 IconManager* icon_manager() override;
78 GpuProfileCache* gpu_profile_cache() override; 78 GpuProfileCache* gpu_profile_cache() override;
79 GpuModeManager* gpu_mode_manager() override; 79 GpuModeManager* gpu_mode_manager() override;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void SetProfileManager(ProfileManager* profile_manager); 139 void SetProfileManager(ProfileManager* profile_manager);
140 void SetIOThread(IOThread* io_thread); 140 void SetIOThread(IOThread* io_thread);
141 void SetSafeBrowsingService(safe_browsing::SafeBrowsingService* sb_service); 141 void SetSafeBrowsingService(safe_browsing::SafeBrowsingService* sb_service);
142 void SetRulesetService( 142 void SetRulesetService(
143 std::unique_ptr<subresource_filter::RulesetService> ruleset_service); 143 std::unique_ptr<subresource_filter::RulesetService> ruleset_service);
144 void SetSystemRequestContext(net::URLRequestContextGetter* context_getter); 144 void SetSystemRequestContext(net::URLRequestContextGetter* context_getter);
145 void SetNotificationUIManager( 145 void SetNotificationUIManager(
146 std::unique_ptr<NotificationUIManager> notification_ui_manager); 146 std::unique_ptr<NotificationUIManager> notification_ui_manager);
147 void SetNotificationPlatformBridge( 147 void SetNotificationPlatformBridge(
148 std::unique_ptr<NotificationPlatformBridge> notification_platform_bridge); 148 std::unique_ptr<NotificationPlatformBridge> notification_platform_bridge);
149 void SetRapporService(rappor::RapporService* rappor_service); 149 void SetRapporServiceImpl(rappor::RapporServiceImpl* rappor_service);
150 void SetShuttingDown(bool is_shutting_down); 150 void SetShuttingDown(bool is_shutting_down);
151 void ShutdownBrowserPolicyConnector(); 151 void ShutdownBrowserPolicyConnector();
152 152
153 private: 153 private:
154 // See CreateInstance() and DestoryInstance() above. 154 // See CreateInstance() and DestoryInstance() above.
155 TestingBrowserProcess(); 155 TestingBrowserProcess();
156 ~TestingBrowserProcess() override; 156 ~TestingBrowserProcess() override;
157 157
158 std::unique_ptr<content::NotificationService> notification_service_; 158 std::unique_ptr<content::NotificationService> notification_service_;
159 std::string app_locale_; 159 std::string app_locale_;
(...skipping 25 matching lines...) Expand all
185 // |tab_manager_| is null by default and will be created when 185 // |tab_manager_| is null by default and will be created when
186 // GetTabManager() is invoked on supported platforms. 186 // GetTabManager() is invoked on supported platforms.
187 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) 187 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
188 std::unique_ptr<memory::TabManager> tab_manager_; 188 std::unique_ptr<memory::TabManager> tab_manager_;
189 #endif 189 #endif
190 190
191 // The following objects are not owned by TestingBrowserProcess: 191 // The following objects are not owned by TestingBrowserProcess:
192 PrefService* local_state_; 192 PrefService* local_state_;
193 IOThread* io_thread_; 193 IOThread* io_thread_;
194 net::URLRequestContextGetter* system_request_context_; 194 net::URLRequestContextGetter* system_request_context_;
195 rappor::RapporService* rappor_service_; 195 rappor::RapporServiceImpl* rappor_service_;
196 196
197 std::unique_ptr<BrowserProcessPlatformPart> platform_part_; 197 std::unique_ptr<BrowserProcessPlatformPart> platform_part_;
198 198
199 #if BUILDFLAG(ENABLE_EXTENSIONS) 199 #if BUILDFLAG(ENABLE_EXTENSIONS)
200 std::unique_ptr<MediaFileSystemRegistry> media_file_system_registry_; 200 std::unique_ptr<MediaFileSystemRegistry> media_file_system_registry_;
201 201
202 std::unique_ptr<extensions::ExtensionsBrowserClient> 202 std::unique_ptr<extensions::ExtensionsBrowserClient>
203 extensions_browser_client_; 203 extensions_browser_client_;
204 #endif 204 #endif
205 205
(...skipping 17 matching lines...) Expand all
223 class TestingBrowserProcessInitializer { 223 class TestingBrowserProcessInitializer {
224 public: 224 public:
225 TestingBrowserProcessInitializer(); 225 TestingBrowserProcessInitializer();
226 ~TestingBrowserProcessInitializer(); 226 ~TestingBrowserProcessInitializer();
227 227
228 private: 228 private:
229 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer); 229 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer);
230 }; 230 };
231 231
232 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ 232 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698