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

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: Addressed comments 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_
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
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 scoped_refptr<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 28 matching lines...) Expand all
119 #endif 130 #endif
120 131
121 virtual bool have_inspector_files() const; 132 virtual bool have_inspector_files() const;
122 133
123 virtual ChromeNetLog* net_log() { return NULL; } 134 virtual ChromeNetLog* net_log() { return NULL; }
124 135
125 #if defined(IPC_MESSAGE_LOG_ENABLED) 136 #if defined(IPC_MESSAGE_LOG_ENABLED)
126 virtual void SetIPCLoggingEnabled(bool enable) {} 137 virtual void SetIPCLoggingEnabled(bool enable) {}
127 #endif 138 #endif
128 139
140 virtual void InitSystemRequestContext() {}
129 void SetPrefService(PrefService* pref_service); 141 void SetPrefService(PrefService* pref_service);
130 void SetGoogleURLTracker(GoogleURLTracker* google_url_tracker); 142 void SetGoogleURLTracker(GoogleURLTracker* google_url_tracker);
131 143
132 private: 144 private:
133 NotificationService notification_service_; 145 NotificationService notification_service_;
134 scoped_ptr<base::WaitableEvent> shutdown_event_; 146 scoped_ptr<base::WaitableEvent> shutdown_event_;
135 unsigned int module_ref_count_; 147 unsigned int module_ref_count_;
136 scoped_ptr<ui::Clipboard> clipboard_; 148 scoped_ptr<ui::Clipboard> clipboard_;
149 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
137 std::string app_locale_; 150 std::string app_locale_;
138 151
139 PrefService* pref_service_; 152 PrefService* pref_service_;
140 bool created_configuration_policy_provider_keeper_; 153 bool created_configuration_policy_provider_keeper_;
141 scoped_ptr<policy::ConfigurationPolicyProviderKeeper> 154 scoped_ptr<policy::ConfigurationPolicyProviderKeeper>
142 configuration_policy_provider_keeper_; 155 configuration_policy_provider_keeper_;
143 scoped_ptr<GoogleURLTracker> google_url_tracker_; 156 scoped_ptr<GoogleURLTracker> google_url_tracker_;
144 157
145 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); 158 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess);
146 }; 159 };
147 160
148 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_ 161 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698