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

Side by Side Diff: chrome/browser/profiles/profile.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 // This class gathers state related to a single user profile. 5 // This class gathers state related to a single user profile.
6 6
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_
8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_
9 9
10 #include <string> 10 #include <string>
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 virtual base::Time GetStartTime() const = 0; 249 virtual base::Time GetStartTime() const = 0;
250 250
251 // Creates the main net::URLRequestContextGetter that will be returned by 251 // Creates the main net::URLRequestContextGetter that will be returned by
252 // GetRequestContext(). Should only be called once per ContentBrowserClient 252 // GetRequestContext(). Should only be called once per ContentBrowserClient
253 // object. This function is exposed because of the circular dependency where 253 // object. This function is exposed because of the circular dependency where
254 // GetStoragePartition() is used to retrieve the request context, but creation 254 // GetStoragePartition() is used to retrieve the request context, but creation
255 // still has to happen in the Profile so the StoragePartition calls 255 // still has to happen in the Profile so the StoragePartition calls
256 // ContextBrowserClient to call this function. 256 // ContextBrowserClient to call this function.
257 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. 257 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved.
258 virtual net::URLRequestContextGetter* CreateRequestContext( 258 virtual net::URLRequestContextGetter* CreateRequestContext(
259 content::ProtocolHandlerMap* protocol_handlers) = 0; 259 content::ProtocolHandlerMap* protocol_handlers,
260 content::ProtocolHandlerScopedVector protocol_interceptors) = 0;
260 261
261 // Creates the net::URLRequestContextGetter for a StoragePartition. Should 262 // Creates the net::URLRequestContextGetter for a StoragePartition. Should
262 // only be called once per partition_path per ContentBrowserClient object. 263 // only be called once per partition_path per ContentBrowserClient object.
263 // This function is exposed because the request context is retrieved from the 264 // This function is exposed because the request context is retrieved from the
264 // StoragePartition, but creation still has to happen in the Profile so the 265 // StoragePartition, but creation still has to happen in the Profile so the
265 // StoragePartition calls ContextBrowserClient to call this function. 266 // StoragePartition calls ContextBrowserClient to call this function.
266 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. 267 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved.
267 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( 268 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
268 const base::FilePath& partition_path, 269 const base::FilePath& partition_path,
269 bool in_memory, 270 bool in_memory,
270 content::ProtocolHandlerMap* protocol_handlers) = 0; 271 content::ProtocolHandlerMap* protocol_handlers,
272 content::ProtocolHandlerScopedVector protocol_interceptors) = 0;
271 273
272 // Returns the last directory that was chosen for uploading or opening a file. 274 // Returns the last directory that was chosen for uploading or opening a file.
273 virtual base::FilePath last_selected_directory() = 0; 275 virtual base::FilePath last_selected_directory() = 0;
274 virtual void set_last_selected_directory(const base::FilePath& path) = 0; 276 virtual void set_last_selected_directory(const base::FilePath& path) = 0;
275 277
276 #if defined(OS_CHROMEOS) 278 #if defined(OS_CHROMEOS)
277 enum AppLocaleChangedVia { 279 enum AppLocaleChangedVia {
278 // Caused by chrome://settings change. 280 // Caused by chrome://settings change.
279 APP_LOCALE_CHANGED_VIA_SETTINGS, 281 APP_LOCALE_CHANGED_VIA_SETTINGS,
280 // Locale has been reverted via LocaleChangeGuard. 282 // Locale has been reverted via LocaleChangeGuard.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 struct hash<Profile*> { 402 struct hash<Profile*> {
401 std::size_t operator()(Profile* const& p) const { 403 std::size_t operator()(Profile* const& p) const {
402 return reinterpret_cast<std::size_t>(p); 404 return reinterpret_cast<std::size_t>(p);
403 } 405 }
404 }; 406 };
405 407
406 } // namespace BASE_HASH_NAMESPACE 408 } // namespace BASE_HASH_NAMESPACE
407 #endif 409 #endif
408 410
409 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ 411 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698