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

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

Issue 11147026: Initial refactor to get profiles to propagate storage partition details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes based on Albert's review. Created 8 years, 2 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 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/supports_user_data.h" 10 #include "base/supports_user_data.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 virtual net::URLRequestContextGetter* GetRequestContext() = 0; 87 virtual net::URLRequestContextGetter* GetRequestContext() = 0;
88 88
89 // Returns the request context appropriate for the given renderer. If the 89 // Returns the request context appropriate for the given renderer. If the
90 // renderer process doesn't have an associated installed app, or if the 90 // renderer process doesn't have an associated installed app, or if the
91 // installed app's is_storage_isolated() returns false, this is equivalent to 91 // installed app's is_storage_isolated() returns false, this is equivalent to
92 // calling GetRequestContext(). 92 // calling GetRequestContext().
93 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( 93 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
94 int renderer_child_id) = 0; 94 int renderer_child_id) = 0;
95 95
96 virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition( 96 virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition(
97 const std::string& partition_id) = 0; 97 const FilePath& partition_path,
98 bool in_memory) = 0;
98 99
99 // Returns the default request context for media resources associated with 100 // Returns the default request context for media resources associated with
100 // this context. 101 // this context.
101 // TODO(creis): Remove this version in favor of the one below. 102 // TODO(creis): Remove this version in favor of the one below.
102 virtual net::URLRequestContextGetter* GetMediaRequestContext() = 0; 103 virtual net::URLRequestContextGetter* GetMediaRequestContext() = 0;
103 104
104 // Returns the request context for media resources associated with this 105 // Returns the request context for media resources associated with this
105 // context and renderer process. 106 // context and renderer process.
106 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( 107 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
107 int renderer_child_id) = 0; 108 int renderer_child_id) = 0;
108 virtual net::URLRequestContextGetter* 109 virtual net::URLRequestContextGetter*
109 GetMediaRequestContextForStoragePartition( 110 GetMediaRequestContextForStoragePartition(
110 const std::string& partition_id) = 0; 111 const FilePath& partition_path,
112 bool in_memory) = 0;
111 113
112 // Returns the resource context. 114 // Returns the resource context.
113 virtual ResourceContext* GetResourceContext() = 0; 115 virtual ResourceContext* GetResourceContext() = 0;
114 116
115 // Returns the DownloadManagerDelegate for this context. This will be called 117 // Returns the DownloadManagerDelegate for this context. This will be called
116 // once per context. The embedder owns the delegate and is responsible for 118 // once per context. The embedder owns the delegate and is responsible for
117 // ensuring that it outlives DownloadManager. It's valid to return NULL. 119 // ensuring that it outlives DownloadManager. It's valid to return NULL.
118 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() = 0; 120 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() = 0;
119 121
120 // Returns the geolocation permission context for this context. It's valid to 122 // Returns the geolocation permission context for this context. It's valid to
(...skipping 18 matching lines...) Expand all
139 struct hash<content::BrowserContext*> { 141 struct hash<content::BrowserContext*> {
140 std::size_t operator()(content::BrowserContext* const& p) const { 142 std::size_t operator()(content::BrowserContext* const& p) const {
141 return reinterpret_cast<std::size_t>(p); 143 return reinterpret_cast<std::size_t>(p);
142 } 144 }
143 }; 145 };
144 146
145 } // namespace BASE_HASH_NAMESPACE 147 } // namespace BASE_HASH_NAMESPACE
146 #endif 148 #endif
147 149
148 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 150 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698