| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 137   // BrowserContext initializs the corresponding getters when its objects are | 137   // BrowserContext initializs the corresponding getters when its objects are | 
| 138   // created, but if the embedder wants to pass the ResourceContext to another | 138   // created, but if the embedder wants to pass the ResourceContext to another | 
| 139   // thread before they use BrowserContext, they should call this to make sure | 139   // thread before they use BrowserContext, they should call this to make sure | 
| 140   // that the ResourceContext is ready. | 140   // that the ResourceContext is ready. | 
| 141   static void EnsureResourceContextInitialized(BrowserContext* browser_context); | 141   static void EnsureResourceContextInitialized(BrowserContext* browser_context); | 
| 142 | 142 | 
| 143   // Tells the HTML5 objects on this context to persist their session state | 143   // Tells the HTML5 objects on this context to persist their session state | 
| 144   // across the next restart. | 144   // across the next restart. | 
| 145   static void SaveSessionState(BrowserContext* browser_context); | 145   static void SaveSessionState(BrowserContext* browser_context); | 
| 146 | 146 | 
| 147   static void SetDownloadManagerForTesting(BrowserContext* browser_context, | 147   static void SetDownloadManagerForTesting( | 
| 148                                            DownloadManager* download_manager); | 148       BrowserContext* browser_context, | 
|  | 149       std::unique_ptr<content::DownloadManager> download_manager); | 
| 149 | 150 | 
| 150   // Makes the Service Manager aware of this BrowserContext, and assigns a user | 151   // Makes the Service Manager aware of this BrowserContext, and assigns a user | 
| 151   // ID number to it. Should be called for each BrowserContext created. | 152   // ID number to it. Should be called for each BrowserContext created. | 
| 152   static void Initialize(BrowserContext* browser_context, | 153   static void Initialize(BrowserContext* browser_context, | 
| 153                          const base::FilePath& path); | 154                          const base::FilePath& path); | 
| 154 | 155 | 
| 155   // Returns a Service User ID associated with this BrowserContext. This ID is | 156   // Returns a Service User ID associated with this BrowserContext. This ID is | 
| 156   // not persistent across runs. See | 157   // not persistent across runs. See | 
| 157   // services/service_manager/public/interfaces/connector.mojom. By default, | 158   // services/service_manager/public/interfaces/connector.mojom. By default, | 
| 158   // this user id is randomly generated when Initialize() is called. | 159   // this user id is randomly generated when Initialize() is called. | 
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 249   using StaticServiceMap = std::map<std::string, ServiceInfo>; | 250   using StaticServiceMap = std::map<std::string, ServiceInfo>; | 
| 250 | 251 | 
| 251   // Registers per-browser-context services to be loaded in the browser process | 252   // Registers per-browser-context services to be loaded in the browser process | 
| 252   // by the Service Manager. | 253   // by the Service Manager. | 
| 253   virtual void RegisterInProcessServices(StaticServiceMap* services) {} | 254   virtual void RegisterInProcessServices(StaticServiceMap* services) {} | 
| 254 }; | 255 }; | 
| 255 | 256 | 
| 256 }  // namespace content | 257 }  // namespace content | 
| 257 | 258 | 
| 258 #endif  // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 259 #endif  // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 
| OLD | NEW | 
|---|