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

Side by Side Diff: content/public/browser/browser_context.h

Issue 11308362: Add StoragePartition's ProtocolHandlers at URLRequestContext construction time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move ShellResourceContext into .cc file Created 8 years 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 CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/hash_tables.h" 9 #include "base/hash_tables.h"
10 #include "base/memory/scoped_ptr.h"
10 #include "base/supports_user_data.h" 11 #include "base/supports_user_data.h"
11 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "net/url_request/url_request_job_factory.h"
12 14
13 namespace net { 15 namespace net {
14 class URLRequestContextGetter; 16 class URLRequestContextGetter;
15 } 17 }
16 18
17 namespace quota { 19 namespace quota {
18 class SpecialStoragePolicy; 20 class SpecialStoragePolicy;
19 } 21 }
20 22
21 class FilePath; 23 class FilePath;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 82
81 // Return whether this context is incognito. Default is false. 83 // Return whether this context is incognito. Default is false.
82 // This doesn't belong here; http://crbug.com/89628 84 // This doesn't belong here; http://crbug.com/89628
83 virtual bool IsOffTheRecord() const = 0; 85 virtual bool IsOffTheRecord() const = 0;
84 86
85 // Returns the request context information associated with this context. Call 87 // Returns the request context information associated with this context. Call
86 // this only on the UI thread, since it can send notifications that should 88 // this only on the UI thread, since it can send notifications that should
87 // happen on the UI thread. 89 // happen on the UI thread.
88 // TODO(creis): Remove this version in favor of the one below. 90 // TODO(creis): Remove this version in favor of the one below.
89 virtual net::URLRequestContextGetter* GetRequestContext() = 0; 91 virtual net::URLRequestContextGetter* GetRequestContext() = 0;
92 virtual net::URLRequestContextGetter* CreateRequestContext(
93 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
94 blob_protocol_handler,
95 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
96 file_system_protocol_handler,
97 scoped_ptr<net::URLRequestJobFactory::Interceptor>
98 developer_protocol_handler) = 0;
90 99
91 // Returns the request context appropriate for the given renderer. If the 100 // Returns the request context appropriate for the given renderer. If the
92 // renderer process doesn't have an associated installed app, or if the 101 // renderer process doesn't have an associated installed app, or if the
93 // installed app's is_storage_isolated() returns false, this is equivalent to 102 // installed app's is_storage_isolated() returns false, this is equivalent to
94 // calling GetRequestContext(). 103 // calling GetRequestContext().
95 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( 104 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
96 int renderer_child_id) = 0; 105 int renderer_child_id) = 0;
97 106
98 virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition( 107 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
99 const FilePath& partition_path, 108 const FilePath& partition_path,
100 bool in_memory) = 0; 109 bool in_memory,
110 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
111 blob_protocol_handler,
112 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
113 file_system_protocol_handler,
114 scoped_ptr<net::URLRequestJobFactory::Interceptor>
115 developer_protocol_handler) = 0;
101 116
102 // Returns the default request context for media resources associated with 117 // Returns the default request context for media resources associated with
103 // this context. 118 // this context.
104 // TODO(creis): Remove this version in favor of the one below. 119 // TODO(creis): Remove this version in favor of the one below.
105 virtual net::URLRequestContextGetter* GetMediaRequestContext() = 0; 120 virtual net::URLRequestContextGetter* GetMediaRequestContext() = 0;
106 121
107 // Returns the request context for media resources associated with this 122 // Returns the request context for media resources associated with this
108 // context and renderer process. 123 // context and renderer process.
109 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( 124 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
110 int renderer_child_id) = 0; 125 int renderer_child_id) = 0;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 struct hash<content::BrowserContext*> { 158 struct hash<content::BrowserContext*> {
144 std::size_t operator()(content::BrowserContext* const& p) const { 159 std::size_t operator()(content::BrowserContext* const& p) const {
145 return reinterpret_cast<std::size_t>(p); 160 return reinterpret_cast<std::size_t>(p);
146 } 161 }
147 }; 162 };
148 163
149 } // namespace BASE_HASH_NAMESPACE 164 } // namespace BASE_HASH_NAMESPACE
150 #endif 165 #endif
151 166
152 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 167 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698