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

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

Issue 2731283009: Swap ownership of RulesetService and the content delegate (Closed)
Patch Set: engedy review Created 3 years, 9 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
81 BackgroundModeManager* background_mode_manager() override; 81 BackgroundModeManager* background_mode_manager() override;
82 void set_background_mode_manager_for_test( 82 void set_background_mode_manager_for_test(
83 std::unique_ptr<BackgroundModeManager> manager) override; 83 std::unique_ptr<BackgroundModeManager> manager) override;
84 StatusTray* status_tray() override; 84 StatusTray* status_tray() override;
85 safe_browsing::SafeBrowsingService* safe_browsing_service() override; 85 safe_browsing::SafeBrowsingService* safe_browsing_service() override;
86 safe_browsing::ClientSideDetectionService* safe_browsing_detection_service() 86 safe_browsing::ClientSideDetectionService* safe_browsing_detection_service()
87 override; 87 override;
88 subresource_filter::RulesetService* subresource_filter_ruleset_service() 88 subresource_filter::ContentRulesetService*
89 override; 89 subresource_filter_ruleset_service() override;
90 net::URLRequestContextGetter* system_request_context() override; 90 net::URLRequestContextGetter* system_request_context() override;
91 BrowserProcessPlatformPart* platform_part() override; 91 BrowserProcessPlatformPart* platform_part() override;
92 92
93 extensions::EventRouterForwarder* extension_event_router_forwarder() override; 93 extensions::EventRouterForwarder* extension_event_router_forwarder() override;
94 NotificationUIManager* notification_ui_manager() override; 94 NotificationUIManager* notification_ui_manager() override;
95 NotificationPlatformBridge* notification_platform_bridge() override; 95 NotificationPlatformBridge* notification_platform_bridge() override;
96 message_center::MessageCenter* message_center() override; 96 message_center::MessageCenter* message_center() override;
97 IntranetRedirectDetector* intranet_redirect_detector() override; 97 IntranetRedirectDetector* intranet_redirect_detector() override;
98 void CreateDevToolsHttpProtocolHandler(const std::string& ip, 98 void CreateDevToolsHttpProtocolHandler(const std::string& ip,
99 uint16_t port) override; 99 uint16_t port) override;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
143 void SetRulesetService( 143 void SetRulesetService(
144 std::unique_ptr<subresource_filter::RulesetService> ruleset_service); 144 std::unique_ptr<subresource_filter::ContentRulesetService>
145 ruleset_service);
145 void SetSystemRequestContext(net::URLRequestContextGetter* context_getter); 146 void SetSystemRequestContext(net::URLRequestContextGetter* context_getter);
146 void SetNotificationUIManager( 147 void SetNotificationUIManager(
147 std::unique_ptr<NotificationUIManager> notification_ui_manager); 148 std::unique_ptr<NotificationUIManager> notification_ui_manager);
148 void SetNotificationPlatformBridge( 149 void SetNotificationPlatformBridge(
149 std::unique_ptr<NotificationPlatformBridge> notification_platform_bridge); 150 std::unique_ptr<NotificationPlatformBridge> notification_platform_bridge);
150 void SetRapporServiceImpl(rappor::RapporServiceImpl* rappor_service); 151 void SetRapporServiceImpl(rappor::RapporServiceImpl* rappor_service);
151 void SetUkmService(ukm::UkmService* ukm_service); 152 void SetUkmService(ukm::UkmService* ukm_service);
152 void SetShuttingDown(bool is_shutting_down); 153 void SetShuttingDown(bool is_shutting_down);
153 void ShutdownBrowserPolicyConnector(); 154 void ShutdownBrowserPolicyConnector();
154 155
(...skipping 17 matching lines...) Expand all
172 #endif 173 #endif
173 174
174 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) 175 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
175 std::unique_ptr<printing::BackgroundPrintingManager> 176 std::unique_ptr<printing::BackgroundPrintingManager>
176 background_printing_manager_; 177 background_printing_manager_;
177 scoped_refptr<printing::PrintPreviewDialogController> 178 scoped_refptr<printing::PrintPreviewDialogController>
178 print_preview_dialog_controller_; 179 print_preview_dialog_controller_;
179 #endif 180 #endif
180 181
181 scoped_refptr<safe_browsing::SafeBrowsingService> sb_service_; 182 scoped_refptr<safe_browsing::SafeBrowsingService> sb_service_;
182 std::unique_ptr<subresource_filter::RulesetService> 183 std::unique_ptr<subresource_filter::ContentRulesetService>
183 subresource_filter_ruleset_service_; 184 subresource_filter_ruleset_service_;
184 185
185 std::unique_ptr<network_time::NetworkTimeTracker> network_time_tracker_; 186 std::unique_ptr<network_time::NetworkTimeTracker> network_time_tracker_;
186 187
187 // |tab_manager_| is null by default and will be created when 188 // |tab_manager_| is null by default and will be created when
188 // GetTabManager() is invoked on supported platforms. 189 // GetTabManager() is invoked on supported platforms.
189 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) 190 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
190 std::unique_ptr<memory::TabManager> tab_manager_; 191 std::unique_ptr<memory::TabManager> tab_manager_;
191 #endif 192 #endif
192 193
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 class TestingBrowserProcessInitializer { 227 class TestingBrowserProcessInitializer {
227 public: 228 public:
228 TestingBrowserProcessInitializer(); 229 TestingBrowserProcessInitializer();
229 ~TestingBrowserProcessInitializer(); 230 ~TestingBrowserProcessInitializer();
230 231
231 private: 232 private:
232 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer); 233 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer);
233 }; 234 };
234 235
235 #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/subresource_filter/test_ruleset_publisher.cc ('k') | chrome/test/base/testing_browser_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698