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

Side by Side Diff: chrome/browser/profiles/profile_impl_io_data.h

Issue 187223003: Allow content layer to pass ProtocolInterceptors when we create URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 const base::FilePath& infinite_cache_path, 52 const base::FilePath& infinite_cache_path,
53 chrome_browser_net::Predictor* predictor, 53 chrome_browser_net::Predictor* predictor,
54 content::CookieStoreConfig::SessionCookieMode 54 content::CookieStoreConfig::SessionCookieMode
55 session_cookie_mode, 55 session_cookie_mode,
56 quota::SpecialStoragePolicy* special_storage_policy); 56 quota::SpecialStoragePolicy* special_storage_policy);
57 57
58 // These Create*ContextGetter() functions are only exposed because the 58 // These Create*ContextGetter() functions are only exposed because the
59 // circular relationship between Profile, ProfileIOData::Handle, and the 59 // circular relationship between Profile, ProfileIOData::Handle, and the
60 // ChromeURLRequestContextGetter factories requires Profile be able to call 60 // ChromeURLRequestContextGetter factories requires Profile be able to call
61 // these functions. 61 // these functions.
62 scoped_refptr<ChromeURLRequestContextGetter> 62 scoped_refptr<ChromeURLRequestContextGetter> CreateMainRequestContextGetter(
63 CreateMainRequestContextGetter( 63 content::ProtocolHandlerMap* protocol_handlers,
64 content::ProtocolHandlerMap* protocol_handlers, 64 content::ProtocolHandlerScopedVector protocol_interceptors,
65 PrefService* local_state, 65 PrefService* local_state,
66 IOThread* io_thread) const; 66 IOThread* io_thread) const;
67 scoped_refptr<ChromeURLRequestContextGetter> 67 scoped_refptr<ChromeURLRequestContextGetter>
68 CreateIsolatedAppRequestContextGetter( 68 CreateIsolatedAppRequestContextGetter(
69 const base::FilePath& partition_path, 69 const base::FilePath& partition_path,
70 bool in_memory, 70 bool in_memory,
71 content::ProtocolHandlerMap* protocol_handlers) const; 71 content::ProtocolHandlerMap* protocol_handlers,
72 content::ProtocolHandlerScopedVector protocol_interceptors) const;
72 73
73 content::ResourceContext* GetResourceContext() const; 74 content::ResourceContext* GetResourceContext() const;
74 // GetResourceContextNoInit() does not call LazyInitialize() so it can be 75 // GetResourceContextNoInit() does not call LazyInitialize() so it can be
75 // safely be used during initialization. 76 // safely be used during initialization.
76 content::ResourceContext* GetResourceContextNoInit() const; 77 content::ResourceContext* GetResourceContextNoInit() const;
77 scoped_refptr<ChromeURLRequestContextGetter> 78 scoped_refptr<ChromeURLRequestContextGetter>
78 GetMediaRequestContextGetter() const; 79 GetMediaRequestContextGetter() const;
79 scoped_refptr<ChromeURLRequestContextGetter> 80 scoped_refptr<ChromeURLRequestContextGetter>
80 GetExtensionsRequestContextGetter() const; 81 GetExtensionsRequestContextGetter() const;
81 scoped_refptr<ChromeURLRequestContextGetter> 82 scoped_refptr<ChromeURLRequestContextGetter>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 base::FilePath infinite_cache_path; 146 base::FilePath infinite_cache_path;
146 content::CookieStoreConfig::SessionCookieMode session_cookie_mode; 147 content::CookieStoreConfig::SessionCookieMode session_cookie_mode;
147 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy; 148 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy;
148 }; 149 };
149 150
150 ProfileImplIOData(); 151 ProfileImplIOData();
151 virtual ~ProfileImplIOData(); 152 virtual ~ProfileImplIOData();
152 153
153 virtual void InitializeInternal( 154 virtual void InitializeInternal(
154 ProfileParams* profile_params, 155 ProfileParams* profile_params,
155 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE; 156 content::ProtocolHandlerMap* protocol_handlers,
157 content::ProtocolHandlerScopedVector protocol_interceptors)
158 const OVERRIDE;
156 virtual void InitializeExtensionsRequestContext( 159 virtual void InitializeExtensionsRequestContext(
157 ProfileParams* profile_params) const OVERRIDE; 160 ProfileParams* profile_params) const OVERRIDE;
158 virtual ChromeURLRequestContext* InitializeAppRequestContext( 161 virtual ChromeURLRequestContext* InitializeAppRequestContext(
159 ChromeURLRequestContext* main_context, 162 ChromeURLRequestContext* main_context,
160 const StoragePartitionDescriptor& partition_descriptor, 163 const StoragePartitionDescriptor& partition_descriptor,
161 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 164 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
162 protocol_handler_interceptor, 165 protocol_handler_interceptor,
163 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE; 166 content::ProtocolHandlerMap* protocol_handlers,
167 content::ProtocolHandlerScopedVector protocol_interceptors)
168 const OVERRIDE;
164 virtual ChromeURLRequestContext* InitializeMediaRequestContext( 169 virtual ChromeURLRequestContext* InitializeMediaRequestContext(
165 ChromeURLRequestContext* original_context, 170 ChromeURLRequestContext* original_context,
166 const StoragePartitionDescriptor& partition_descriptor) const OVERRIDE; 171 const StoragePartitionDescriptor& partition_descriptor) const OVERRIDE;
167 virtual ChromeURLRequestContext* 172 virtual ChromeURLRequestContext*
168 AcquireMediaRequestContext() const OVERRIDE; 173 AcquireMediaRequestContext() const OVERRIDE;
169 virtual ChromeURLRequestContext* 174 virtual ChromeURLRequestContext* AcquireIsolatedAppRequestContext(
170 AcquireIsolatedAppRequestContext( 175 ChromeURLRequestContext* main_context,
171 ChromeURLRequestContext* main_context, 176 const StoragePartitionDescriptor& partition_descriptor,
172 const StoragePartitionDescriptor& partition_descriptor, 177 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
173 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 178 protocol_handler_interceptor,
174 protocol_handler_interceptor, 179 content::ProtocolHandlerMap* protocol_handlers,
175 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE; 180 content::ProtocolHandlerScopedVector protocol_interceptors)
181 const OVERRIDE;
176 virtual ChromeURLRequestContext* 182 virtual ChromeURLRequestContext*
177 AcquireIsolatedMediaRequestContext( 183 AcquireIsolatedMediaRequestContext(
178 ChromeURLRequestContext* app_context, 184 ChromeURLRequestContext* app_context,
179 const StoragePartitionDescriptor& partition_descriptor) 185 const StoragePartitionDescriptor& partition_descriptor)
180 const OVERRIDE; 186 const OVERRIDE;
181 187
182 // Deletes all network related data since |time|. It deletes transport 188 // Deletes all network related data since |time|. It deletes transport
183 // security state since |time| and also deletes HttpServerProperties data. 189 // security state since |time| and also deletes HttpServerProperties data.
184 // Works asynchronously, however if the |completion| callback is non-null, 190 // Works asynchronously, however if the |completion| callback is non-null,
185 // it will be posted on the UI thread once the removal process completes. 191 // it will be posted on the UI thread once the removal process completes.
(...skipping 20 matching lines...) Expand all
206 212
207 // Parameters needed for isolated apps. 213 // Parameters needed for isolated apps.
208 base::FilePath profile_path_; 214 base::FilePath profile_path_;
209 int app_cache_max_size_; 215 int app_cache_max_size_;
210 int app_media_cache_max_size_; 216 int app_media_cache_max_size_;
211 217
212 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); 218 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData);
213 }; 219 };
214 220
215 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ 221 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698