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

Side by Side Diff: chrome/browser/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 // This interface is for managing the global services of the application. Each 5 // This interface is for managing the global services of the application. Each
6 // service is lazily created when requested the first time. The service getters 6 // service is lazily created when requested the first time. The service getters
7 // will return NULL if the service is not available, so callers must check for 7 // will return NULL if the service is not available, so callers must check for
8 // this condition. 8 // this condition.
9 9
10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_H_ 10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_H_
11 #define CHROME_BROWSER_BROWSER_PROCESS_H_ 11 #define CHROME_BROWSER_BROWSER_PROCESS_H_
12 #pragma once 12 #pragma once
13 13
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 #include "base/basictypes.h" 17 #include "base/basictypes.h"
18 #include "base/ref_counted.h"
18 #include "ipc/ipc_message.h" 19 #include "ipc/ipc_message.h"
19 20
20 class AutomationProviderList; 21 class AutomationProviderList;
21 22
22 namespace safe_browsing { 23 namespace safe_browsing {
23 class ClientSideDetectionService; 24 class ClientSideDetectionService;
24 } 25 }
25 26
26 class ChromeNetLog; 27 class ChromeNetLog;
27 class DevToolsManager; 28 class DevToolsManager;
28 class DownloadRequestLimiter; 29 class DownloadRequestLimiter;
29 class DownloadStatusUpdater; 30 class DownloadStatusUpdater;
30 class GoogleURLTracker; 31 class GoogleURLTracker;
31 class IconManager; 32 class IconManager;
32 class IntranetRedirectDetector; 33 class IntranetRedirectDetector;
33 class IOThread; 34 class IOThread;
34 class MetricsService; 35 class MetricsService;
35 class NotificationUIManager; 36 class NotificationUIManager;
37 class PrefProxyConfigTracker;
36 class PrefService; 38 class PrefService;
37 class ProfileManager; 39 class ProfileManager;
38 class ResourceDispatcherHost; 40 class ResourceDispatcherHost;
39 class SidebarManager; 41 class SidebarManager;
40 class TabCloseableStateWatcher; 42 class TabCloseableStateWatcher;
41 class ThumbnailGenerator; 43 class ThumbnailGenerator;
44 class URLRequestContextGetter;
42 45
43 namespace base { 46 namespace base {
44 class Thread; 47 class Thread;
45 class WaitableEvent; 48 class WaitableEvent;
46 } 49 }
47 50
48 namespace printing { 51 namespace printing {
49 class PrintJobManager; 52 class PrintJobManager;
50 class PrintPreviewTabController; 53 class PrintPreviewTabController;
51 } 54 }
(...skipping 21 matching lines...) Expand all
73 76
74 // Services: any of these getters may return NULL 77 // Services: any of these getters may return NULL
75 virtual ResourceDispatcherHost* resource_dispatcher_host() = 0; 78 virtual ResourceDispatcherHost* resource_dispatcher_host() = 0;
76 79
77 virtual MetricsService* metrics_service() = 0; 80 virtual MetricsService* metrics_service() = 0;
78 virtual ProfileManager* profile_manager() = 0; 81 virtual ProfileManager* profile_manager() = 0;
79 virtual PrefService* local_state() = 0; 82 virtual PrefService* local_state() = 0;
80 virtual DevToolsManager* devtools_manager() = 0; 83 virtual DevToolsManager* devtools_manager() = 0;
81 virtual SidebarManager* sidebar_manager() = 0; 84 virtual SidebarManager* sidebar_manager() = 0;
82 virtual ui::Clipboard* clipboard() = 0; 85 virtual ui::Clipboard* clipboard() = 0;
86 virtual PrefProxyConfigTracker* pref_proxy_config_tracker() = 0;
87 virtual scoped_refptr<URLRequestContextGetter> system_request_context() = 0;
83 88
84 // Returns the manager for desktop notifications. 89 // Returns the manager for desktop notifications.
85 virtual NotificationUIManager* notification_ui_manager() = 0; 90 virtual NotificationUIManager* notification_ui_manager() = 0;
86 91
87 // Returns the thread that we perform I/O coordination on (network requests, 92 // Returns the thread that we perform I/O coordination on (network requests,
88 // communication with renderers, etc. 93 // communication with renderers, etc.
89 // NOTE: You should ONLY use this to pass to IPC or other objects which must 94 // NOTE: You should ONLY use this to pass to IPC or other objects which must
90 // need a MessageLoop*. If you just want to post a task, use 95 // need a MessageLoop*. If you just want to post a task, use
91 // BrowserThread::PostTask (or other variants) as they take care of checking 96 // BrowserThread::PostTask (or other variants) as they take care of checking
92 // that a thread is still alive, race conditions, lifetime differences etc. 97 // that a thread is still alive, race conditions, lifetime differences etc.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 #endif 201 #endif
197 202
198 const std::string& plugin_data_remover_mime_type() const { 203 const std::string& plugin_data_remover_mime_type() const {
199 return plugin_data_remover_mime_type_; 204 return plugin_data_remover_mime_type_;
200 } 205 }
201 206
202 void set_plugin_data_remover_mime_type(const std::string& mime_type) { 207 void set_plugin_data_remover_mime_type(const std::string& mime_type) {
203 plugin_data_remover_mime_type_ = mime_type; 208 plugin_data_remover_mime_type_ = mime_type;
204 } 209 }
205 210
211 virtual void InitSystemRequestContext() = 0;
212
206 private: 213 private:
207 // User-data-dir based profiles. 214 // User-data-dir based profiles.
208 std::vector<std::wstring> user_data_dir_profiles_; 215 std::vector<std::wstring> user_data_dir_profiles_;
209 216
210 // Used for testing plugin data removal at shutdown. 217 // Used for testing plugin data removal at shutdown.
211 std::string plugin_data_remover_mime_type_; 218 std::string plugin_data_remover_mime_type_;
212 219
213 DISALLOW_COPY_AND_ASSIGN(BrowserProcess); 220 DISALLOW_COPY_AND_ASSIGN(BrowserProcess);
214 }; 221 };
215 222
216 extern BrowserProcess* g_browser_process; 223 extern BrowserProcess* g_browser_process;
217 224
218 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ 225 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698