| 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_TESTING_BROWSER_PROCESS_H_ | 10 #ifndef CHROME_TEST_TESTING_BROWSER_PROCESS_H_ |
| 11 #define CHROME_TEST_TESTING_BROWSER_PROCESS_H_ | 11 #define CHROME_TEST_TESTING_BROWSER_PROCESS_H_ |
| 12 #pragma once | 12 #pragma once |
| 13 | 13 |
| 14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 15 | 15 |
| 16 #include <string> | 16 #include <string> |
| 17 | 17 |
| 18 #include "base/scoped_ptr.h" | 18 #include "base/scoped_ptr.h" |
| 19 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
| 20 #include "chrome/browser/google/google_url_tracker.h" |
| 21 #include "chrome/browser/net/pref_proxy_config_service.h" |
| 22 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
| 23 #include "chrome/browser/policy/configuration_policy_provider.h" |
| 24 #include "chrome/browser/policy/configuration_policy_provider_keeper.h" |
| 25 #include "chrome/browser/policy/dummy_configuration_policy_provider.h" |
| 26 #include "chrome/browser/prefs/pref_service.h" |
| 20 #include "chrome/common/notification_service.h" | 27 #include "chrome/common/notification_service.h" |
| 21 | 28 |
| 22 class IOThread; | 29 class IOThread; |
| 23 class GoogleURLTracker; | 30 class GoogleURLTracker; |
| 24 class PrefService; | 31 class PrefService; |
| 25 | 32 |
| 26 namespace base { | 33 namespace base { |
| 27 class WaitableEvent; | 34 class WaitableEvent; |
| 28 } | 35 } |
| 29 | 36 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 78 |
| 72 virtual DevToolsManager* devtools_manager(); | 79 virtual DevToolsManager* devtools_manager(); |
| 73 | 80 |
| 74 virtual SidebarManager* sidebar_manager(); | 81 virtual SidebarManager* sidebar_manager(); |
| 75 | 82 |
| 76 virtual TabCloseableStateWatcher* tab_closeable_state_watcher(); | 83 virtual TabCloseableStateWatcher* tab_closeable_state_watcher(); |
| 77 | 84 |
| 78 virtual safe_browsing::ClientSideDetectionService* | 85 virtual safe_browsing::ClientSideDetectionService* |
| 79 safe_browsing_detection_service(); | 86 safe_browsing_detection_service(); |
| 80 | 87 |
| 88 virtual PrefProxyConfigTracker* pref_proxy_config_tracker(); |
| 89 |
| 90 virtual URLRequestContextGetter* system_request_context(); |
| 91 |
| 81 virtual ui::Clipboard* clipboard(); | 92 virtual ui::Clipboard* clipboard(); |
| 82 | 93 |
| 83 virtual NotificationUIManager* notification_ui_manager(); | 94 virtual NotificationUIManager* notification_ui_manager(); |
| 84 | 95 |
| 85 virtual GoogleURLTracker* google_url_tracker(); | 96 virtual GoogleURLTracker* google_url_tracker(); |
| 86 | 97 |
| 87 virtual IntranetRedirectDetector* intranet_redirect_detector(); | 98 virtual IntranetRedirectDetector* intranet_redirect_detector(); |
| 88 | 99 |
| 89 virtual AutomationProviderList* InitAutomationProviderList(); | 100 virtual AutomationProviderList* InitAutomationProviderList(); |
| 90 | 101 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 116 | 127 |
| 117 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 128 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| 118 virtual void StartAutoupdateTimer() {} | 129 virtual void StartAutoupdateTimer() {} |
| 119 #endif | 130 #endif |
| 120 | 131 |
| 121 virtual bool have_inspector_files() const; | 132 virtual bool have_inspector_files() const; |
| 122 #if defined(IPC_MESSAGE_LOG_ENABLED) | 133 #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 123 virtual void SetIPCLoggingEnabled(bool enable) {} | 134 virtual void SetIPCLoggingEnabled(bool enable) {} |
| 124 #endif | 135 #endif |
| 125 | 136 |
| 137 virtual void InitSystemRequestContext() {} |
| 126 void SetPrefService(PrefService* pref_service); | 138 void SetPrefService(PrefService* pref_service); |
| 127 void SetGoogleURLTracker(GoogleURLTracker* google_url_tracker); | 139 void SetGoogleURLTracker(GoogleURLTracker* google_url_tracker); |
| 128 | 140 |
| 129 private: | 141 private: |
| 130 NotificationService notification_service_; | 142 NotificationService notification_service_; |
| 131 scoped_ptr<base::WaitableEvent> shutdown_event_; | 143 scoped_ptr<base::WaitableEvent> shutdown_event_; |
| 132 unsigned int module_ref_count_; | 144 unsigned int module_ref_count_; |
| 133 scoped_ptr<ui::Clipboard> clipboard_; | 145 scoped_ptr<ui::Clipboard> clipboard_; |
| 146 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
| 134 std::string app_locale_; | 147 std::string app_locale_; |
| 135 | 148 |
| 136 PrefService* pref_service_; | 149 PrefService* pref_service_; |
| 137 bool created_configuration_policy_provider_keeper_; | 150 bool created_configuration_policy_provider_keeper_; |
| 138 scoped_ptr<policy::ConfigurationPolicyProviderKeeper> | 151 scoped_ptr<policy::ConfigurationPolicyProviderKeeper> |
| 139 configuration_policy_provider_keeper_; | 152 configuration_policy_provider_keeper_; |
| 140 scoped_ptr<GoogleURLTracker> google_url_tracker_; | 153 scoped_ptr<GoogleURLTracker> google_url_tracker_; |
| 141 | 154 |
| 142 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); | 155 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); |
| 143 }; | 156 }; |
| 144 | 157 |
| 145 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_ | 158 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_ |
| OLD | NEW |