OLD | NEW |
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 // Cleanly destroys |g_browser_process|, which has special deletion semantics. | 51 // Cleanly destroys |g_browser_process|, which has special deletion semantics. |
52 static void DeleteInstance(); | 52 static void DeleteInstance(); |
53 | 53 |
54 // Convenience method to get g_browser_process as a TestingBrowserProcess*. | 54 // Convenience method to get g_browser_process as a TestingBrowserProcess*. |
55 static TestingBrowserProcess* GetGlobal(); | 55 static TestingBrowserProcess* GetGlobal(); |
56 | 56 |
57 // BrowserProcess overrides: | 57 // BrowserProcess overrides: |
58 void ResourceDispatcherHostCreated() override; | 58 void ResourceDispatcherHostCreated() override; |
59 void EndSession() override; | 59 void EndSession() override; |
60 MetricsServicesManager* GetMetricsServicesManager() override; | 60 metrics_services_manager::MetricsServicesManager* GetMetricsServicesManager() |
| 61 override; |
61 metrics::MetricsService* metrics_service() override; | 62 metrics::MetricsService* metrics_service() override; |
62 rappor::RapporService* rappor_service() override; | 63 rappor::RapporService* rappor_service() override; |
63 IOThread* io_thread() override; | 64 IOThread* io_thread() override; |
64 WatchDogThread* watchdog_thread() override; | 65 WatchDogThread* watchdog_thread() override; |
65 ProfileManager* profile_manager() override; | 66 ProfileManager* profile_manager() override; |
66 PrefService* local_state() override; | 67 PrefService* local_state() override; |
67 variations::VariationsService* variations_service() override; | 68 variations::VariationsService* variations_service() override; |
68 web_resource::PromoResourceService* promo_resource_service() override; | 69 web_resource::PromoResourceService* promo_resource_service() override; |
69 policy::BrowserPolicyConnector* browser_policy_connector() override; | 70 policy::BrowserPolicyConnector* browser_policy_connector() override; |
70 policy::PolicyService* policy_service() override; | 71 policy::PolicyService* policy_service() override; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 class TestingBrowserProcessInitializer { | 206 class TestingBrowserProcessInitializer { |
206 public: | 207 public: |
207 TestingBrowserProcessInitializer(); | 208 TestingBrowserProcessInitializer(); |
208 ~TestingBrowserProcessInitializer(); | 209 ~TestingBrowserProcessInitializer(); |
209 | 210 |
210 private: | 211 private: |
211 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer); | 212 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer); |
212 }; | 213 }; |
213 | 214 |
214 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ | 215 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ |
OLD | NEW |