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