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

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

Issue 16703025: [StorageMonitor] Move StorageMonitor ownership to BrowserProcessImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 6 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 96 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
97 virtual void StartAutoupdateTimer() OVERRIDE {} 97 virtual void StartAutoupdateTimer() OVERRIDE {}
98 #endif 98 #endif
99 99
100 virtual ChromeNetLog* net_log() OVERRIDE; 100 virtual ChromeNetLog* net_log() OVERRIDE;
101 virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE; 101 virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE;
102 virtual ComponentUpdateService* component_updater() OVERRIDE; 102 virtual ComponentUpdateService* component_updater() OVERRIDE;
103 virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; 103 virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE;
104 virtual PnaclComponentInstaller* pnacl_component_installer() OVERRIDE; 104 virtual PnaclComponentInstaller* pnacl_component_installer() OVERRIDE;
105 virtual BookmarkPromptController* bookmark_prompt_controller() OVERRIDE; 105 virtual BookmarkPromptController* bookmark_prompt_controller() OVERRIDE;
106 virtual chrome::StorageMonitor* storage_monitor() OVERRIDE;
106 virtual chrome::MediaFileSystemRegistry* 107 virtual chrome::MediaFileSystemRegistry*
107 media_file_system_registry() OVERRIDE; 108 media_file_system_registry() OVERRIDE;
108 virtual bool created_local_state() const OVERRIDE; 109 virtual bool created_local_state() const OVERRIDE;
109 110
110 #if defined(ENABLE_WEBRTC) 111 #if defined(ENABLE_WEBRTC)
111 virtual WebRtcLogUploader* webrtc_log_uploader() OVERRIDE; 112 virtual WebRtcLogUploader* webrtc_log_uploader() OVERRIDE;
112 #endif 113 #endif
113 114
114 // Set the local state for tests. Consumer is responsible for cleaning it up 115 // Set the local state for tests. Consumer is responsible for cleaning it up
115 // afterwards (using ScopedTestingLocalState, for example). 116 // afterwards (using ScopedTestingLocalState, for example).
116 void SetLocalState(PrefService* local_state); 117 void SetLocalState(PrefService* local_state);
117 void SetProfileManager(ProfileManager* profile_manager); 118 void SetProfileManager(ProfileManager* profile_manager);
118 void SetIOThread(IOThread* io_thread); 119 void SetIOThread(IOThread* io_thread);
119 void SetBrowserPolicyConnector(policy::BrowserPolicyConnector* connector); 120 void SetBrowserPolicyConnector(policy::BrowserPolicyConnector* connector);
120 void SetSafeBrowsingService(SafeBrowsingService* sb_service); 121 void SetSafeBrowsingService(SafeBrowsingService* sb_service);
121 void SetBookmarkPromptController(BookmarkPromptController* controller); 122 void SetBookmarkPromptController(BookmarkPromptController* controller);
122 void SetSystemRequestContext(net::URLRequestContextGetter* context_getter); 123 void SetSystemRequestContext(net::URLRequestContextGetter* context_getter);
124 void SetStorageMonitor(chrome::StorageMonitor* storage_monitor);
123 125
124 private: 126 private:
125 scoped_ptr<content::NotificationService> notification_service_; 127 scoped_ptr<content::NotificationService> notification_service_;
126 unsigned int module_ref_count_; 128 unsigned int module_ref_count_;
127 std::string app_locale_; 129 std::string app_locale_;
128 130
129 // TODO(ios): Add back members as more code is compiled. 131 // TODO(ios): Add back members as more code is compiled.
130 #if !defined(OS_IOS) 132 #if !defined(OS_IOS)
131 #if defined(ENABLE_CONFIGURATION_POLICY) 133 #if defined(ENABLE_CONFIGURATION_POLICY)
132 scoped_ptr<policy::BrowserPolicyConnector> browser_policy_connector_; 134 scoped_ptr<policy::BrowserPolicyConnector> browser_policy_connector_;
133 #else 135 #else
134 scoped_ptr<policy::PolicyService> policy_service_; 136 scoped_ptr<policy::PolicyService> policy_service_;
135 #endif 137 #endif
136 scoped_ptr<ProfileManager> profile_manager_; 138 scoped_ptr<ProfileManager> profile_manager_;
137 scoped_ptr<NotificationUIManager> notification_ui_manager_; 139 scoped_ptr<NotificationUIManager> notification_ui_manager_;
138 scoped_ptr<printing::BackgroundPrintingManager> background_printing_manager_; 140 scoped_ptr<printing::BackgroundPrintingManager> background_printing_manager_;
139 scoped_refptr<printing::PrintPreviewDialogController> 141 scoped_refptr<printing::PrintPreviewDialogController>
140 print_preview_dialog_controller_; 142 print_preview_dialog_controller_;
141 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; 143 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_;
142 scoped_ptr<RenderWidgetSnapshotTaker> render_widget_snapshot_taker_; 144 scoped_ptr<RenderWidgetSnapshotTaker> render_widget_snapshot_taker_;
143 scoped_refptr<SafeBrowsingService> sb_service_; 145 scoped_refptr<SafeBrowsingService> sb_service_;
144 scoped_ptr<BookmarkPromptController> bookmark_prompt_controller_; 146 scoped_ptr<BookmarkPromptController> bookmark_prompt_controller_;
145 #if !defined(OS_ANDROID) 147 #endif // !defined(OS_IOS)
148
149 #if !defined(OS_IOS) && !defined(OS_ANDROID)
150 scoped_ptr<chrome::StorageMonitor> storage_monitor_;
146 scoped_ptr<chrome::MediaFileSystemRegistry> media_file_system_registry_; 151 scoped_ptr<chrome::MediaFileSystemRegistry> media_file_system_registry_;
147 #endif 152 #endif
148 #endif // !defined(OS_IOS)
149 153
150 // The following objects are not owned by TestingBrowserProcess: 154 // The following objects are not owned by TestingBrowserProcess:
151 PrefService* local_state_; 155 PrefService* local_state_;
152 IOThread* io_thread_; 156 IOThread* io_thread_;
153 net::URLRequestContextGetter* system_request_context_; 157 net::URLRequestContextGetter* system_request_context_;
154 158
155 scoped_ptr<BrowserProcessPlatformPart> platform_part_; 159 scoped_ptr<BrowserProcessPlatformPart> platform_part_;
156 160
157 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); 161 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess);
158 }; 162 };
159 163
160 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ 164 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698