| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 MediaFileSystemRegistry* media_file_system_registry() override; | 122 MediaFileSystemRegistry* media_file_system_registry() override; |
| 123 bool created_local_state() const override; | 123 bool created_local_state() const override; |
| 124 | 124 |
| 125 #if BUILDFLAG(ENABLE_WEBRTC) | 125 #if BUILDFLAG(ENABLE_WEBRTC) |
| 126 WebRtcLogUploader* webrtc_log_uploader() override; | 126 WebRtcLogUploader* webrtc_log_uploader() override; |
| 127 #endif | 127 #endif |
| 128 | 128 |
| 129 network_time::NetworkTimeTracker* network_time_tracker() override; | 129 network_time::NetworkTimeTracker* network_time_tracker() override; |
| 130 | 130 |
| 131 gcm::GCMDriver* gcm_driver() override; | 131 gcm::GCMDriver* gcm_driver() override; |
| 132 memory::TabManager* GetTabManager() override; | 132 resource_coordinator::TabManager* GetTabManager() override; |
| 133 shell_integration::DefaultWebClientState CachedDefaultWebClientState() | 133 shell_integration::DefaultWebClientState CachedDefaultWebClientState() |
| 134 override; | 134 override; |
| 135 physical_web::PhysicalWebDataSource* GetPhysicalWebDataSource() override; | 135 physical_web::PhysicalWebDataSource* GetPhysicalWebDataSource() override; |
| 136 | 136 |
| 137 // Set the local state for tests. Consumer is responsible for cleaning it up | 137 // Set the local state for tests. Consumer is responsible for cleaning it up |
| 138 // afterwards (using ScopedTestingLocalState, for example). | 138 // afterwards (using ScopedTestingLocalState, for example). |
| 139 void SetLocalState(PrefService* local_state); | 139 void SetLocalState(PrefService* local_state); |
| 140 void SetProfileManager(ProfileManager* profile_manager); | 140 void SetProfileManager(ProfileManager* profile_manager); |
| 141 void SetIOThread(IOThread* io_thread); | 141 void SetIOThread(IOThread* io_thread); |
| 142 void SetSafeBrowsingService(safe_browsing::SafeBrowsingService* sb_service); | 142 void SetSafeBrowsingService(safe_browsing::SafeBrowsingService* sb_service); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 scoped_refptr<safe_browsing::SafeBrowsingService> sb_service_; | 182 scoped_refptr<safe_browsing::SafeBrowsingService> sb_service_; |
| 183 std::unique_ptr<subresource_filter::ContentRulesetService> | 183 std::unique_ptr<subresource_filter::ContentRulesetService> |
| 184 subresource_filter_ruleset_service_; | 184 subresource_filter_ruleset_service_; |
| 185 | 185 |
| 186 std::unique_ptr<network_time::NetworkTimeTracker> network_time_tracker_; | 186 std::unique_ptr<network_time::NetworkTimeTracker> network_time_tracker_; |
| 187 | 187 |
| 188 // |tab_manager_| is null by default and will be created when | 188 // |tab_manager_| is null by default and will be created when |
| 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<resource_coordinator::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::UkmRecorder* ukm_recorder_; | 199 ukm::UkmRecorder* ukm_recorder_; |
| 200 | 200 |
| 201 std::unique_ptr<BrowserProcessPlatformPart> platform_part_; | 201 std::unique_ptr<BrowserProcessPlatformPart> platform_part_; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 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_ |
| OLD | NEW |