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

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

Issue 6292017: Extended: Add "system" URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Next iteration Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
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_
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 virtual DevToolsManager* devtools_manager(); 72 virtual DevToolsManager* devtools_manager();
73 73
74 virtual SidebarManager* sidebar_manager(); 74 virtual SidebarManager* sidebar_manager();
75 75
76 virtual TabCloseableStateWatcher* tab_closeable_state_watcher(); 76 virtual TabCloseableStateWatcher* tab_closeable_state_watcher();
77 77
78 virtual safe_browsing::ClientSideDetectionService* 78 virtual safe_browsing::ClientSideDetectionService*
79 safe_browsing_detection_service(); 79 safe_browsing_detection_service();
80 80
81 virtual PrefProxyConfigTracker* pref_proxy_config_tracker();
82
83 virtual scoped_refptr<URLRequestContextGetter> system_request_context();
84
85 #if defined(OS_CHROMEOS)
86 virtual chromeos::ProxyConfigServiceImpl*
87 chromeos_proxy_config_service_impl();
88 #endif // defined(OS_CHROMEOS)
89
81 virtual ui::Clipboard* clipboard(); 90 virtual ui::Clipboard* clipboard();
82 91
83 virtual NotificationUIManager* notification_ui_manager(); 92 virtual NotificationUIManager* notification_ui_manager();
84 93
85 virtual GoogleURLTracker* google_url_tracker(); 94 virtual GoogleURLTracker* google_url_tracker();
86 95
87 virtual IntranetRedirectDetector* intranet_redirect_detector(); 96 virtual IntranetRedirectDetector* intranet_redirect_detector();
88 97
89 virtual AutomationProviderList* InitAutomationProviderList(); 98 virtual AutomationProviderList* InitAutomationProviderList();
90 99
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 #endif 136 #endif
128 137
129 void SetPrefService(PrefService* pref_service); 138 void SetPrefService(PrefService* pref_service);
130 void SetGoogleURLTracker(GoogleURLTracker* google_url_tracker); 139 void SetGoogleURLTracker(GoogleURLTracker* google_url_tracker);
131 140
132 private: 141 private:
133 NotificationService notification_service_; 142 NotificationService notification_service_;
134 scoped_ptr<base::WaitableEvent> shutdown_event_; 143 scoped_ptr<base::WaitableEvent> shutdown_event_;
135 unsigned int module_ref_count_; 144 unsigned int module_ref_count_;
136 scoped_ptr<ui::Clipboard> clipboard_; 145 scoped_ptr<ui::Clipboard> clipboard_;
146 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
137 std::string app_locale_; 147 std::string app_locale_;
138 148
139 PrefService* pref_service_; 149 PrefService* pref_service_;
140 bool created_configuration_policy_provider_keeper_; 150 bool created_configuration_policy_provider_keeper_;
141 scoped_ptr<policy::ConfigurationPolicyProviderKeeper> 151 scoped_ptr<policy::ConfigurationPolicyProviderKeeper>
142 configuration_policy_provider_keeper_; 152 configuration_policy_provider_keeper_;
143 scoped_ptr<GoogleURLTracker> google_url_tracker_; 153 scoped_ptr<GoogleURLTracker> google_url_tracker_;
144 154
145 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); 155 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess);
146 }; 156 };
147 157
148 // Scoper to put a TestingBrowserProcess in |g_browser_process|. 158 // Scoper to put a TestingBrowserProcess in |g_browser_process|.
149 class ScopedTestingBrowserProcess { 159 class ScopedTestingBrowserProcess {
150 public: 160 public:
151 ScopedTestingBrowserProcess(); 161 ScopedTestingBrowserProcess();
152 ~ScopedTestingBrowserProcess(); 162 ~ScopedTestingBrowserProcess();
153 163
154 private: 164 private:
155 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. 165 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062.
156 // After the transition is over, we should just stack-allocate it. 166 // After the transition is over, we should just stack-allocate it.
157 scoped_ptr<TestingBrowserProcess> browser_process_; 167 scoped_ptr<TestingBrowserProcess> browser_process_;
158 168
159 DISALLOW_COPY_AND_ASSIGN(ScopedTestingBrowserProcess); 169 DISALLOW_COPY_AND_ASSIGN(ScopedTestingBrowserProcess);
160 }; 170 };
161 171
162 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_ 172 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698