| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 virtual ComponentUpdateService* component_updater() OVERRIDE; | 123 virtual ComponentUpdateService* component_updater() OVERRIDE; |
| 124 virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; | 124 virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; |
| 125 | 125 |
| 126 // Set the local state for tests. Consumer is responsible for cleaning it up | 126 // Set the local state for tests. Consumer is responsible for cleaning it up |
| 127 // afterwards (using ScopedTestingLocalState, for example). | 127 // afterwards (using ScopedTestingLocalState, for example). |
| 128 void SetLocalState(PrefService* local_state); | 128 void SetLocalState(PrefService* local_state); |
| 129 void SetGoogleURLTracker(GoogleURLTracker* google_url_tracker); | 129 void SetGoogleURLTracker(GoogleURLTracker* google_url_tracker); |
| 130 void SetProfileManager(ProfileManager* profile_manager); | 130 void SetProfileManager(ProfileManager* profile_manager); |
| 131 void SetIOThread(IOThread* io_thread); | 131 void SetIOThread(IOThread* io_thread); |
| 132 void SetDevToolsManager(DevToolsManager*); | 132 void SetDevToolsManager(DevToolsManager*); |
| 133 void SetBrowserPolicyConnector(policy::BrowserPolicyConnector* connector); |
| 133 | 134 |
| 134 private: | 135 private: |
| 135 NotificationServiceImpl notification_service_; | 136 NotificationServiceImpl notification_service_; |
| 136 unsigned int module_ref_count_; | 137 unsigned int module_ref_count_; |
| 137 scoped_ptr<ui::Clipboard> clipboard_; | 138 scoped_ptr<ui::Clipboard> clipboard_; |
| 138 std::string app_locale_; | 139 std::string app_locale_; |
| 139 | 140 |
| 140 // Weak pointer. | 141 // Weak pointer. |
| 141 PrefService* local_state_; | 142 PrefService* local_state_; |
| 142 scoped_ptr<policy::BrowserPolicyConnector> browser_policy_connector_; | 143 scoped_ptr<policy::BrowserPolicyConnector> browser_policy_connector_; |
| 143 scoped_ptr<GoogleURLTracker> google_url_tracker_; | 144 scoped_ptr<GoogleURLTracker> google_url_tracker_; |
| 144 scoped_ptr<ProfileManager> profile_manager_; | 145 scoped_ptr<ProfileManager> profile_manager_; |
| 145 scoped_ptr<NotificationUIManager> notification_ui_manager_; | 146 scoped_ptr<NotificationUIManager> notification_ui_manager_; |
| 146 scoped_ptr<printing::BackgroundPrintingManager> background_printing_manager_; | 147 scoped_ptr<printing::BackgroundPrintingManager> background_printing_manager_; |
| 147 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; | 148 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; |
| 148 IOThread* io_thread_; | 149 IOThread* io_thread_; |
| 149 scoped_ptr<DevToolsManager> devtools_manager_; | 150 scoped_ptr<DevToolsManager> devtools_manager_; |
| 150 | 151 |
| 151 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); | 152 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); |
| 152 }; | 153 }; |
| 153 | 154 |
| 154 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ | 155 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ |
| OLD | NEW |