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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 static void SetDownloadManagerForTesting(BrowserContext* browser_context, | 147 static void SetDownloadManagerForTesting(BrowserContext* browser_context, |
148 DownloadManager* download_manager); | 148 DownloadManager* download_manager); |
149 | 149 |
150 // Makes the Service Manager aware of this BrowserContext, and assigns a user | 150 // Makes the Service Manager aware of this BrowserContext, and assigns a user |
151 // ID number to it. Should be called for each BrowserContext created. | 151 // ID number to it. Should be called for each BrowserContext created. |
152 static void Initialize(BrowserContext* browser_context, | 152 static void Initialize(BrowserContext* browser_context, |
153 const base::FilePath& path); | 153 const base::FilePath& path); |
154 | 154 |
155 // Returns a Service User ID associated with this BrowserContext. This ID is | 155 // Returns a Service User ID associated with this BrowserContext. This ID is |
156 // not persistent across runs. See | 156 // not persistent across runs. See |
157 // services/shell/public/interfaces/connector.mojom. By default, this user id | 157 // services/service_manager/public/interfaces/connector.mojom. By default, |
158 // is randomly generated when Initialize() is called. | 158 // this user id is randomly generated when Initialize() is called. |
159 static const std::string& GetServiceUserIdFor( | 159 static const std::string& GetServiceUserIdFor( |
160 BrowserContext* browser_context); | 160 BrowserContext* browser_context); |
161 | 161 |
162 // Returns the BrowserContext associated with |user_id|, or nullptr if no | 162 // Returns the BrowserContext associated with |user_id|, or nullptr if no |
163 // BrowserContext exists for that |user_id|. | 163 // BrowserContext exists for that |user_id|. |
164 static BrowserContext* GetBrowserContextForServiceUserId( | 164 static BrowserContext* GetBrowserContextForServiceUserId( |
165 const std::string& user_id); | 165 const std::string& user_id); |
166 | 166 |
167 // Returns a Connector associated with this BrowserContext, which can be used | 167 // Returns a Connector associated with this BrowserContext, which can be used |
168 // to connect to service instances bound as this user. | 168 // to connect to service instances bound as this user. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 // called only once per partition_path. | 242 // called only once per partition_path. |
243 virtual net::URLRequestContextGetter* | 243 virtual net::URLRequestContextGetter* |
244 CreateMediaRequestContextForStoragePartition( | 244 CreateMediaRequestContextForStoragePartition( |
245 const base::FilePath& partition_path, | 245 const base::FilePath& partition_path, |
246 bool in_memory) = 0; | 246 bool in_memory) = 0; |
247 }; | 247 }; |
248 | 248 |
249 } // namespace content | 249 } // namespace content |
250 | 250 |
251 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 251 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
OLD | NEW |