OLD | NEW |
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/memory/scoped_ptr.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // TODO(creis): Remove this version in favor of the one below. | 109 // TODO(creis): Remove this version in favor of the one below. |
110 virtual net::URLRequestContextGetter* GetRequestContext() = 0; | 110 virtual net::URLRequestContextGetter* GetRequestContext() = 0; |
111 | 111 |
112 // Returns the request context appropriate for the given renderer. If the | 112 // Returns the request context appropriate for the given renderer. If the |
113 // renderer process doesn't have an associated installed app, or if the | 113 // renderer process doesn't have an associated installed app, or if the |
114 // installed app's is_storage_isolated() returns false, this is equivalent to | 114 // installed app's is_storage_isolated() returns false, this is equivalent to |
115 // calling GetRequestContext(). | 115 // calling GetRequestContext(). |
116 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 116 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
117 int renderer_child_id) = 0; | 117 int renderer_child_id) = 0; |
118 | 118 |
119 virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition( | |
120 const base::FilePath& partition_path, | |
121 bool in_memory) = 0; | |
122 | |
123 // Returns the default request context for media resources associated with | 119 // Returns the default request context for media resources associated with |
124 // this context. | 120 // this context. |
125 // TODO(creis): Remove this version in favor of the one below. | 121 // TODO(creis): Remove this version in favor of the one below. |
126 virtual net::URLRequestContextGetter* GetMediaRequestContext() = 0; | 122 virtual net::URLRequestContextGetter* GetMediaRequestContext() = 0; |
127 | 123 |
128 // Returns the request context for media resources associated with this | 124 // Returns the request context for media resources associated with this |
129 // context and renderer process. | 125 // context and renderer process. |
130 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( | 126 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( |
131 int renderer_child_id) = 0; | 127 int renderer_child_id) = 0; |
132 virtual net::URLRequestContextGetter* | 128 virtual net::URLRequestContextGetter* |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 struct hash<content::BrowserContext*> { | 160 struct hash<content::BrowserContext*> { |
165 std::size_t operator()(content::BrowserContext* const& p) const { | 161 std::size_t operator()(content::BrowserContext* const& p) const { |
166 return reinterpret_cast<std::size_t>(p); | 162 return reinterpret_cast<std::size_t>(p); |
167 } | 163 } |
168 }; | 164 }; |
169 | 165 |
170 } // namespace BASE_HASH_NAMESPACE | 166 } // namespace BASE_HASH_NAMESPACE |
171 #endif | 167 #endif |
172 | 168 |
173 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 169 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
OLD | NEW |