| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // BrowserContext initializs the corresponding getters when its objects are | 138 // BrowserContext initializs the corresponding getters when its objects are |
| 139 // created, but if the embedder wants to pass the ResourceContext to another | 139 // created, but if the embedder wants to pass the ResourceContext to another |
| 140 // thread before they use BrowserContext, they should call this to make sure | 140 // thread before they use BrowserContext, they should call this to make sure |
| 141 // that the ResourceContext is ready. | 141 // that the ResourceContext is ready. |
| 142 static void EnsureResourceContextInitialized(BrowserContext* browser_context); | 142 static void EnsureResourceContextInitialized(BrowserContext* browser_context); |
| 143 | 143 |
| 144 // Tells the HTML5 objects on this context to persist their session state | 144 // Tells the HTML5 objects on this context to persist their session state |
| 145 // across the next restart. | 145 // across the next restart. |
| 146 static void SaveSessionState(BrowserContext* browser_context); | 146 static void SaveSessionState(BrowserContext* browser_context); |
| 147 | 147 |
| 148 static void SetDownloadManagerForTesting(BrowserContext* browser_context, | 148 static void SetDownloadManagerForTesting( |
| 149 DownloadManager* download_manager); | 149 BrowserContext* browser_context, |
| 150 std::unique_ptr<content::DownloadManager> download_manager); |
| 150 | 151 |
| 151 // Makes the Service Manager aware of this BrowserContext, and assigns a user | 152 // Makes the Service Manager aware of this BrowserContext, and assigns a user |
| 152 // ID number to it. Should be called for each BrowserContext created. | 153 // ID number to it. Should be called for each BrowserContext created. |
| 153 static void Initialize(BrowserContext* browser_context, | 154 static void Initialize(BrowserContext* browser_context, |
| 154 const base::FilePath& path); | 155 const base::FilePath& path); |
| 155 | 156 |
| 156 // Returns a Service User ID associated with this BrowserContext. This ID is | 157 // Returns a Service User ID associated with this BrowserContext. This ID is |
| 157 // not persistent across runs. See | 158 // not persistent across runs. See |
| 158 // services/service_manager/public/interfaces/connector.mojom. By default, | 159 // services/service_manager/public/interfaces/connector.mojom. By default, |
| 159 // this user id is randomly generated when Initialize() is called. | 160 // this user id is randomly generated when Initialize() is called. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 // 2) The embedder saves its salt across restarts. | 265 // 2) The embedder saves its salt across restarts. |
| 265 static std::string CreateRandomMediaDeviceIDSalt(); | 266 static std::string CreateRandomMediaDeviceIDSalt(); |
| 266 | 267 |
| 267 private: | 268 private: |
| 268 const std::string media_device_id_salt_; | 269 const std::string media_device_id_salt_; |
| 269 }; | 270 }; |
| 270 | 271 |
| 271 } // namespace content | 272 } // namespace content |
| 272 | 273 |
| 273 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 274 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| OLD | NEW |