OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This class gathers state related to a single user profile. | 5 // This class gathers state related to a single user profile. |
6 | 6 |
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ | 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ |
8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ | 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "chrome/browser/net/preconnect.h" // TODO: remove this. | 15 #include "chrome/browser/net/preconnect.h" // TODO: remove this. |
16 #include "chrome/common/extensions/extension.h" | 16 #include "chrome/common/extensions/extension.h" |
17 #include "content/browser/browser_context.h" | |
17 | 18 |
18 namespace base { | 19 namespace base { |
19 class Time; | 20 class Time; |
20 } | 21 } |
21 | 22 |
22 namespace chrome_browser_net_websocket_experiment { | 23 namespace chrome_browser_net_websocket_experiment { |
23 class WebSocketExperimentTask; | 24 class WebSocketExperimentTask; |
24 } | 25 } |
25 | 26 |
26 namespace chromeos { | 27 namespace chromeos { |
27 class LibCrosServiceLibraryImpl; | 28 class LibCrosServiceLibraryImpl; |
28 class ResetDefaultProxyConfigServiceTask; | 29 class ResetDefaultProxyConfigServiceTask; |
29 } | 30 } |
30 | 31 |
31 namespace content { | |
32 class ResourceContext; | |
33 } | |
34 | |
35 namespace fileapi { | 32 namespace fileapi { |
36 class FileSystemContext; | 33 class FileSystemContext; |
37 class SandboxedFileSystemContext; | 34 class SandboxedFileSystemContext; |
38 } | 35 } |
39 | 36 |
40 namespace history { | 37 namespace history { |
41 class TopSites; | 38 class TopSites; |
42 } | 39 } |
43 | 40 |
44 namespace net { | 41 namespace net { |
45 class TransportSecurityState; | 42 class TransportSecurityState; |
46 class SSLConfigService; | 43 class SSLConfigService; |
47 } | 44 } |
48 | 45 |
49 | 46 |
50 namespace prerender { | 47 namespace prerender { |
51 class PrerenderManager; | 48 class PrerenderManager; |
52 } | 49 } |
53 | 50 |
54 namespace quota { | |
55 class QuotaManager; | |
56 } | |
57 | |
58 namespace speech_input { | 51 namespace speech_input { |
59 class SpeechRecognizer; | 52 class SpeechRecognizer; |
60 } | 53 } |
61 | 54 |
62 namespace webkit_database { | 55 namespace webkit_database { |
63 class DatabaseTracker; | 56 class DatabaseTracker; |
64 } | 57 } |
65 | 58 |
66 class AutocompleteClassifier; | 59 class AutocompleteClassifier; |
67 class BookmarkModel; | 60 class BookmarkModel; |
68 class BrowserSignin; | 61 class BrowserSignin; |
69 class ChromeAppCacheService; | 62 class ChromeAppCacheService; |
70 class ChromeBlobStorageContext; | |
71 class ChromeURLDataManager; | 63 class ChromeURLDataManager; |
72 class CloudPrintProxyService; | 64 class CloudPrintProxyService; |
73 class DownloadManager; | |
74 class Extension; | 65 class Extension; |
75 class ExtensionDevToolsManager; | 66 class ExtensionDevToolsManager; |
76 class ExtensionEventRouter; | 67 class ExtensionEventRouter; |
77 class ExtensionInfoMap; | 68 class ExtensionInfoMap; |
78 class ExtensionMessageService; | 69 class ExtensionMessageService; |
79 class ExtensionPrefValueMap; | 70 class ExtensionPrefValueMap; |
80 class ExtensionProcessManager; | 71 class ExtensionProcessManager; |
81 class ExtensionService; | 72 class ExtensionService; |
82 class ExtensionSpecialStoragePolicy; | 73 class ExtensionSpecialStoragePolicy; |
83 class FaviconService; | 74 class FaviconService; |
84 class FilePath; | |
85 class FindBarState; | 75 class FindBarState; |
86 class GeolocationContentSettingsMap; | |
87 class GeolocationPermissionContext; | |
88 class HistoryService; | 76 class HistoryService; |
89 class HostContentSettingsMap; | 77 class HostContentSettingsMap; |
90 class HostZoomMap; | |
91 class NavigationController; | 78 class NavigationController; |
92 class PasswordStore; | 79 class PasswordStore; |
93 class PersonalDataManager; | 80 class PersonalDataManager; |
94 class PrefProxyConfigTracker; | 81 class PrefProxyConfigTracker; |
95 class PrefService; | 82 class PrefService; |
96 class ProfileSyncFactory; | 83 class ProfileSyncFactory; |
97 class ProfileSyncService; | 84 class ProfileSyncService; |
98 class PromoCounter; | 85 class PromoCounter; |
99 class ProtocolHandlerRegistry; | 86 class ProtocolHandlerRegistry; |
100 class SQLitePersistentCookieStore; | 87 class SQLitePersistentCookieStore; |
101 class SSLConfigServiceManager; | 88 class SSLConfigServiceManager; |
102 class SSLHostState; | |
103 class SpellCheckHost; | 89 class SpellCheckHost; |
104 class TemplateURLFetcher; | 90 class TemplateURLFetcher; |
105 class TokenService; | 91 class TokenService; |
106 class TransportSecurityPersister; | 92 class TransportSecurityPersister; |
107 class UserScriptMaster; | 93 class UserScriptMaster; |
108 class UserStyleSheetWatcher; | 94 class UserStyleSheetWatcher; |
109 class VisitedLinkEventListener; | 95 class VisitedLinkEventListener; |
110 class VisitedLinkMaster; | 96 class VisitedLinkMaster; |
111 class WebDataService; | 97 class WebDataService; |
112 class WebKitContext; | |
113 class PromoResourceService; | 98 class PromoResourceService; |
114 | 99 |
115 namespace net { | |
116 class URLRequestContextGetter; | |
117 } | |
118 | |
119 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) | 100 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) |
120 // Local profile ids are used to associate resources stored outside the profile | 101 // Local profile ids are used to associate resources stored outside the profile |
121 // directory, like saved passwords in GNOME Keyring / KWallet, with a profile. | 102 // directory, like saved passwords in GNOME Keyring / KWallet, with a profile. |
122 // With high probability, they are unique on the local machine. They are almost | 103 // With high probability, they are unique on the local machine. They are almost |
123 // certainly not unique globally, by design. Do not send them over the network. | 104 // certainly not unique globally, by design. Do not send them over the network. |
124 typedef int LocalProfileId; | 105 typedef int LocalProfileId; |
125 #endif | 106 #endif |
126 | 107 |
127 class Profile { | 108 class Profile : public content::BrowserContext { |
128 public: | 109 public: |
129 // Profile services are accessed with the following parameter. This parameter | 110 // Profile services are accessed with the following parameter. This parameter |
130 // defines what the caller plans to do with the service. | 111 // defines what the caller plans to do with the service. |
131 // The caller is responsible for not performing any operation that would | 112 // The caller is responsible for not performing any operation that would |
132 // result in persistent implicit records while using an OffTheRecord profile. | 113 // result in persistent implicit records while using an OffTheRecord profile. |
133 // This flag allows the profile to perform an additional check. | 114 // This flag allows the profile to perform an additional check. |
134 // | 115 // |
135 // It also gives us an opportunity to perform further checks in the future. We | 116 // It also gives us an opportunity to perform further checks in the future. We |
136 // could, for example, return an history service that only allow some specific | 117 // could, for example, return an history service that only allow some specific |
137 // methods. | 118 // methods. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
204 // time. | 185 // time. |
205 static void RegisterUserPrefs(PrefService* prefs); | 186 static void RegisterUserPrefs(PrefService* prefs); |
206 | 187 |
207 // Create a new profile given a path. | 188 // Create a new profile given a path. |
208 static Profile* CreateProfile(const FilePath& path); | 189 static Profile* CreateProfile(const FilePath& path); |
209 | 190 |
210 // Same as above, but uses async initialization. | 191 // Same as above, but uses async initialization. |
211 static Profile* CreateProfileAsync(const FilePath& path, | 192 static Profile* CreateProfileAsync(const FilePath& path, |
212 Delegate* delegate); | 193 Delegate* delegate); |
213 | 194 |
195 // Begin BrowserContext ------------------------------------------------------ | |
jam
2011/07/21 16:41:54
nit: I haven't this style of comments before, usua
| |
196 | |
197 virtual FilePath GetPath() = 0; | |
198 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0; | |
199 virtual SSLHostState* GetSSLHostState() = 0; | |
200 virtual DownloadManager* GetDownloadManager() = 0; | |
201 virtual bool HasCreatedDownloadManager() const = 0; | |
202 virtual quota::QuotaManager* GetQuotaManager() = 0; | |
203 virtual net::URLRequestContextGetter* GetRequestContext() = 0; | |
204 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | |
205 int renderer_child_id) = 0; | |
206 virtual net::URLRequestContextGetter* GetRequestContextForMedia() = 0; | |
207 virtual const content::ResourceContext& GetResourceContext() = 0; | |
208 virtual HostZoomMap* GetHostZoomMap() = 0; | |
209 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap() = 0; | |
210 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0; | |
211 virtual WebKitContext* GetWebKitContext() = 0; | |
212 virtual ChromeBlobStorageContext* GetBlobStorageContext() = 0; | |
213 | |
214 // End BrowserContext -------------------------------------------------------- | |
215 | |
214 // Returns the name associated with this profile. This name is displayed in | 216 // Returns the name associated with this profile. This name is displayed in |
215 // the browser frame. | 217 // the browser frame. |
216 virtual std::string GetProfileName() = 0; | 218 virtual std::string GetProfileName() = 0; |
217 | 219 |
218 // Returns the path of the directory where this profile's data is stored. | |
219 virtual FilePath GetPath() = 0; | |
220 | |
221 // Return whether this profile is incognito. Default is false. | 220 // Return whether this profile is incognito. Default is false. |
222 virtual bool IsOffTheRecord() = 0; | 221 virtual bool IsOffTheRecord() = 0; |
223 | 222 |
224 // Return the incognito version of this profile. The returned pointer | 223 // Return the incognito version of this profile. The returned pointer |
225 // is owned by the receiving profile. If the receiving profile is off the | 224 // is owned by the receiving profile. If the receiving profile is off the |
226 // record, the same profile is returned. | 225 // record, the same profile is returned. |
227 virtual Profile* GetOffTheRecordProfile() = 0; | 226 virtual Profile* GetOffTheRecordProfile() = 0; |
228 | 227 |
229 // Destroys the incognito profile. | 228 // Destroys the incognito profile. |
230 virtual void DestroyOffTheRecordProfile() = 0; | 229 virtual void DestroyOffTheRecordProfile() = 0; |
231 | 230 |
232 // True if an incognito profile exists. | 231 // True if an incognito profile exists. |
233 virtual bool HasOffTheRecordProfile() = 0; | 232 virtual bool HasOffTheRecordProfile() = 0; |
234 | 233 |
235 // Return the original "recording" profile. This method returns this if the | 234 // Return the original "recording" profile. This method returns this if the |
236 // profile is not incognito. | 235 // profile is not incognito. |
237 virtual Profile* GetOriginalProfile() = 0; | 236 virtual Profile* GetOriginalProfile() = 0; |
238 | 237 |
239 // Returns a pointer to the ChromeAppCacheService instance for this profile. | 238 // Returns a pointer to the ChromeAppCacheService instance for this profile. |
240 virtual ChromeAppCacheService* GetAppCacheService() = 0; | 239 virtual ChromeAppCacheService* GetAppCacheService() = 0; |
241 | 240 |
242 // Returns a pointer to the DatabaseTracker instance for this profile. | |
243 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0; | |
244 | |
245 // Returns a pointer to the TopSites (thumbnail manager) instance | 241 // Returns a pointer to the TopSites (thumbnail manager) instance |
246 // for this profile. | 242 // for this profile. |
247 virtual history::TopSites* GetTopSites() = 0; | 243 virtual history::TopSites* GetTopSites() = 0; |
248 | 244 |
249 // Variant of GetTopSites that doesn't force creation. | 245 // Variant of GetTopSites that doesn't force creation. |
250 virtual history::TopSites* GetTopSitesWithoutCreating() = 0; | 246 virtual history::TopSites* GetTopSitesWithoutCreating() = 0; |
251 | 247 |
252 // Retrieves a pointer to the VisitedLinkMaster associated with this | 248 // Retrieves a pointer to the VisitedLinkMaster associated with this |
253 // profile. The VisitedLinkMaster is lazily created the first time | 249 // profile. The VisitedLinkMaster is lazily created the first time |
254 // that this method is called. | 250 // that this method is called. |
(...skipping 20 matching lines...) Expand all Loading... | |
275 // profile. The instance is created at startup. | 271 // profile. The instance is created at startup. |
276 virtual ExtensionMessageService* GetExtensionMessageService() = 0; | 272 virtual ExtensionMessageService* GetExtensionMessageService() = 0; |
277 | 273 |
278 // Accessor. The instance is created at startup. | 274 // Accessor. The instance is created at startup. |
279 virtual ExtensionEventRouter* GetExtensionEventRouter() = 0; | 275 virtual ExtensionEventRouter* GetExtensionEventRouter() = 0; |
280 | 276 |
281 // Accessor. The instance is created upon first access. | 277 // Accessor. The instance is created upon first access. |
282 virtual ExtensionSpecialStoragePolicy* | 278 virtual ExtensionSpecialStoragePolicy* |
283 GetExtensionSpecialStoragePolicy() = 0; | 279 GetExtensionSpecialStoragePolicy() = 0; |
284 | 280 |
285 // Retrieves a pointer to the SSLHostState associated with this profile. | |
286 // The SSLHostState is lazily created the first time that this method is | |
287 // called. | |
288 virtual SSLHostState* GetSSLHostState() = 0; | |
289 | |
290 // Retrieves a pointer to the TransportSecurityState associated with | 281 // Retrieves a pointer to the TransportSecurityState associated with |
291 // this profile. The TransportSecurityState is lazily created the | 282 // this profile. The TransportSecurityState is lazily created the |
292 // first time that this method is called. | 283 // first time that this method is called. |
293 virtual net::TransportSecurityState* GetTransportSecurityState() = 0; | 284 virtual net::TransportSecurityState* GetTransportSecurityState() = 0; |
294 | 285 |
295 // Retrieves a pointer to the FaviconService associated with this | 286 // Retrieves a pointer to the FaviconService associated with this |
296 // profile. The FaviconService is lazily created the first time | 287 // profile. The FaviconService is lazily created the first time |
297 // that this method is called. | 288 // that this method is called. |
298 // | 289 // |
299 // Although FaviconService is refcounted, this will not addref, and callers | 290 // Although FaviconService is refcounted, this will not addref, and callers |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
351 | 342 |
352 // Retrieves a pointer to the PrefService that manages the preferences | 343 // Retrieves a pointer to the PrefService that manages the preferences |
353 // for OffTheRecord Profiles. This PrefService is lazily created the first | 344 // for OffTheRecord Profiles. This PrefService is lazily created the first |
354 // time that this method is called. | 345 // time that this method is called. |
355 virtual PrefService* GetOffTheRecordPrefs() = 0; | 346 virtual PrefService* GetOffTheRecordPrefs() = 0; |
356 | 347 |
357 // Returns the TemplateURLFetcher for this profile. This is owned by the | 348 // Returns the TemplateURLFetcher for this profile. This is owned by the |
358 // profile. | 349 // profile. |
359 virtual TemplateURLFetcher* GetTemplateURLFetcher() = 0; | 350 virtual TemplateURLFetcher* GetTemplateURLFetcher() = 0; |
360 | 351 |
361 // Returns the DownloadManager associated with this profile. | |
362 virtual DownloadManager* GetDownloadManager() = 0; | |
363 virtual bool HasCreatedDownloadManager() const = 0; | |
364 | |
365 // Returns the PersonalDataManager associated with this profile. | 352 // Returns the PersonalDataManager associated with this profile. |
366 virtual PersonalDataManager* GetPersonalDataManager() = 0; | 353 virtual PersonalDataManager* GetPersonalDataManager() = 0; |
367 | 354 |
368 // Returns the FileSystemContext associated to this profile. The context | 355 // Returns the FileSystemContext associated to this profile. The context |
369 // is lazily created the first time this method is called. This is owned | 356 // is lazily created the first time this method is called. This is owned |
370 // by the profile. | 357 // by the profile. |
371 virtual fileapi::FileSystemContext* GetFileSystemContext() = 0; | 358 virtual fileapi::FileSystemContext* GetFileSystemContext() = 0; |
372 | 359 |
373 virtual quota::QuotaManager* GetQuotaManager() = 0; | |
374 | |
375 // Returns the BrowserSignin object assigned to this profile. | 360 // Returns the BrowserSignin object assigned to this profile. |
376 virtual BrowserSignin* GetBrowserSignin() = 0; | 361 virtual BrowserSignin* GetBrowserSignin() = 0; |
377 | 362 |
378 // Returns the request context information associated with this profile. Call | |
379 // this only on the UI thread, since it can send notifications that should | |
380 // happen on the UI thread. | |
381 virtual net::URLRequestContextGetter* GetRequestContext() = 0; | |
382 | |
383 // Returns the request context appropriate for the given renderer. If the | |
384 // renderer process doesn't have an assosicated installed app, or if the | |
385 // installed app's is_storage_isolated() returns false, this is equivalent to | |
386 // calling GetRequestContext(). | |
387 // TODO(creis): After isolated app storage is no longer an experimental | |
388 // feature, consider making this the default contract for GetRequestContext. | |
389 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | |
390 int renderer_child_id) = 0; | |
391 | |
392 // Returns the request context for media resources asociated with this | |
393 // profile. | |
394 virtual net::URLRequestContextGetter* GetRequestContextForMedia() = 0; | |
395 | |
396 // Returns the request context used for extension-related requests. This | 363 // Returns the request context used for extension-related requests. This |
397 // is only used for a separate cookie store currently. | 364 // is only used for a separate cookie store currently. |
398 virtual net::URLRequestContextGetter* GetRequestContextForExtensions() = 0; | 365 virtual net::URLRequestContextGetter* GetRequestContextForExtensions() = 0; |
399 | 366 |
400 // Returns the request context used within an installed app that has | 367 // Returns the request context used within an installed app that has |
401 // requested isolated storage. | 368 // requested isolated storage. |
402 virtual net::URLRequestContextGetter* GetRequestContextForIsolatedApp( | 369 virtual net::URLRequestContextGetter* GetRequestContextForIsolatedApp( |
403 const std::string& app_id) = 0; | 370 const std::string& app_id) = 0; |
404 | 371 |
405 virtual const content::ResourceContext& GetResourceContext() = 0; | |
406 | |
407 // Called by the ExtensionService that lives in this profile. Gives the | 372 // Called by the ExtensionService that lives in this profile. Gives the |
408 // profile a chance to react to the load event before the EXTENSION_LOADED | 373 // profile a chance to react to the load event before the EXTENSION_LOADED |
409 // notification has fired. The purpose for handling this event first is to | 374 // notification has fired. The purpose for handling this event first is to |
410 // avoid race conditions by making sure URLRequestContexts learn about new | 375 // avoid race conditions by making sure URLRequestContexts learn about new |
411 // extensions before anything else needs them to know. | 376 // extensions before anything else needs them to know. |
412 virtual void RegisterExtensionWithRequestContexts( | 377 virtual void RegisterExtensionWithRequestContexts( |
413 const Extension* extension) {} | 378 const Extension* extension) {} |
414 | 379 |
415 // Called by the ExtensionService that lives in this profile. Lets the | 380 // Called by the ExtensionService that lives in this profile. Lets the |
416 // profile clean up its RequestContexts once all the listeners to the | 381 // profile clean up its RequestContexts once all the listeners to the |
417 // EXTENSION_UNLOADED notification have finished running. | 382 // EXTENSION_UNLOADED notification have finished running. |
418 virtual void UnregisterExtensionWithRequestContexts( | 383 virtual void UnregisterExtensionWithRequestContexts( |
419 const std::string& extension_id, | 384 const std::string& extension_id, |
420 const UnloadedExtensionInfo::Reason) {} | 385 const UnloadedExtensionInfo::Reason) {} |
421 | 386 |
422 // Returns the SSLConfigService for this profile. | 387 // Returns the SSLConfigService for this profile. |
423 virtual net::SSLConfigService* GetSSLConfigService() = 0; | 388 virtual net::SSLConfigService* GetSSLConfigService() = 0; |
424 | 389 |
425 // Returns the Hostname <-> Content settings map for this profile. | 390 // Returns the Hostname <-> Content settings map for this profile. |
426 virtual HostContentSettingsMap* GetHostContentSettingsMap() = 0; | 391 virtual HostContentSettingsMap* GetHostContentSettingsMap() = 0; |
427 | 392 |
428 // Returns the Hostname <-> Zoom Level map for this profile. | |
429 virtual HostZoomMap* GetHostZoomMap() = 0; | |
430 | |
431 // Returns the geolocation settings map for this profile. | |
432 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap() = 0; | |
433 | |
434 // Returns the geolocation permission context for this profile. | |
435 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0; | |
436 | |
437 // Returns the user style sheet watcher. | 393 // Returns the user style sheet watcher. |
438 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() = 0; | 394 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() = 0; |
439 | 395 |
440 // Returns the find bar state for this profile. The find bar state is lazily | 396 // Returns the find bar state for this profile. The find bar state is lazily |
441 // created the first time that this method is called. | 397 // created the first time that this method is called. |
442 virtual FindBarState* GetFindBarState() = 0; | 398 virtual FindBarState* GetFindBarState() = 0; |
443 | 399 |
444 // Returns true if this profile has a profile sync service. | 400 // Returns true if this profile has a profile sync service. |
445 virtual bool HasProfileSyncService() const = 0; | 401 virtual bool HasProfileSyncService() const = 0; |
446 | 402 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
480 virtual base::Time GetStartTime() const = 0; | 436 virtual base::Time GetStartTime() const = 0; |
481 | 437 |
482 // May return NULL. | 438 // May return NULL. |
483 virtual SpellCheckHost* GetSpellCheckHost() = 0; | 439 virtual SpellCheckHost* GetSpellCheckHost() = 0; |
484 | 440 |
485 // If |force| is false, and the spellchecker is already initialized (or is in | 441 // If |force| is false, and the spellchecker is already initialized (or is in |
486 // the process of initializing), then do nothing. Otherwise clobber the | 442 // the process of initializing), then do nothing. Otherwise clobber the |
487 // current spellchecker and replace it with a new one. | 443 // current spellchecker and replace it with a new one. |
488 virtual void ReinitializeSpellCheckHost(bool force) = 0; | 444 virtual void ReinitializeSpellCheckHost(bool force) = 0; |
489 | 445 |
490 // Returns the WebKitContext assigned to this profile. | |
491 virtual WebKitContext* GetWebKitContext() = 0; | |
492 | |
493 // Marks the profile as cleanly shutdown. | 446 // Marks the profile as cleanly shutdown. |
494 // | 447 // |
495 // NOTE: this is invoked internally on a normal shutdown, but is public so | 448 // NOTE: this is invoked internally on a normal shutdown, but is public so |
496 // that it can be invoked when the user logs out/powers down (WM_ENDSESSION). | 449 // that it can be invoked when the user logs out/powers down (WM_ENDSESSION). |
497 virtual void MarkAsCleanShutdown() = 0; | 450 virtual void MarkAsCleanShutdown() = 0; |
498 | 451 |
499 // Initializes extensions machinery. | 452 // Initializes extensions machinery. |
500 // Component extensions are always enabled, external and user extensions | 453 // Component extensions are always enabled, external and user extensions |
501 // are controlled by |extensions_enabled|. | 454 // are controlled by |extensions_enabled|. |
502 virtual void InitExtensions(bool extensions_enabled) = 0; | 455 virtual void InitExtensions(bool extensions_enabled) = 0; |
503 | 456 |
504 // Start up service that gathers data from a promo resource feed. | 457 // Start up service that gathers data from a promo resource feed. |
505 virtual void InitPromoResources() = 0; | 458 virtual void InitPromoResources() = 0; |
506 | 459 |
507 // Register URLRequestFactories for protocols registered with | 460 // Register URLRequestFactories for protocols registered with |
508 // registerProtocolHandler. | 461 // registerProtocolHandler. |
509 virtual void InitRegisteredProtocolHandlers() = 0; | 462 virtual void InitRegisteredProtocolHandlers() = 0; |
510 | 463 |
511 // Returns the last directory that was chosen for uploading or opening a file. | 464 // Returns the last directory that was chosen for uploading or opening a file. |
512 virtual FilePath last_selected_directory() = 0; | 465 virtual FilePath last_selected_directory() = 0; |
513 virtual void set_last_selected_directory(const FilePath& path) = 0; | 466 virtual void set_last_selected_directory(const FilePath& path) = 0; |
514 | 467 |
515 // Returns a pointer to the ChromeBlobStorageContext instance for this | |
516 // profile. | |
517 virtual ChromeBlobStorageContext* GetBlobStorageContext() = 0; | |
518 | |
519 // Returns the IO-thread-accessible profile data for this profile. | 468 // Returns the IO-thread-accessible profile data for this profile. |
520 virtual ExtensionInfoMap* GetExtensionInfoMap() = 0; | 469 virtual ExtensionInfoMap* GetExtensionInfoMap() = 0; |
521 | 470 |
522 // Returns the PromoCounter for Instant, or NULL if not applicable. | 471 // Returns the PromoCounter for Instant, or NULL if not applicable. |
523 virtual PromoCounter* GetInstantPromoCounter() = 0; | 472 virtual PromoCounter* GetInstantPromoCounter() = 0; |
524 | 473 |
525 // Returns the ChromeURLDataManager for this profile. | 474 // Returns the ChromeURLDataManager for this profile. |
526 virtual ChromeURLDataManager* GetChromeURLDataManager() = 0; | 475 virtual ChromeURLDataManager* GetChromeURLDataManager() = 0; |
527 | 476 |
528 #if defined(OS_CHROMEOS) | 477 #if defined(OS_CHROMEOS) |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
633 struct hash<Profile*> { | 582 struct hash<Profile*> { |
634 std::size_t operator()(Profile* const& p) const { | 583 std::size_t operator()(Profile* const& p) const { |
635 return reinterpret_cast<std::size_t>(p); | 584 return reinterpret_cast<std::size_t>(p); |
636 } | 585 } |
637 }; | 586 }; |
638 | 587 |
639 } // namespace __gnu_cxx | 588 } // namespace __gnu_cxx |
640 #endif | 589 #endif |
641 | 590 |
642 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 591 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
OLD | NEW |