| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_PROFILE_H_ | 7 #ifndef CHROME_BROWSER_PROFILE_H_ |
| 8 #define CHROME_BROWSER_PROFILE_H_ | 8 #define CHROME_BROWSER_PROFILE_H_ |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 virtual bool HasCreatedDownloadManager() const = 0; | 155 virtual bool HasCreatedDownloadManager() const = 0; |
| 156 | 156 |
| 157 // Returns the request context information associated with this profile. Call | 157 // Returns the request context information associated with this profile. Call |
| 158 // this only on the UI thread, since it can send notifications that should | 158 // this only on the UI thread, since it can send notifications that should |
| 159 // happen on the UI thread. | 159 // happen on the UI thread. |
| 160 // | 160 // |
| 161 // The returned object is ref'd by the profile. Callers who AddRef() it (to | 161 // The returned object is ref'd by the profile. Callers who AddRef() it (to |
| 162 // keep it alive longer than the profile) must Release() it on the I/O thread. | 162 // keep it alive longer than the profile) must Release() it on the I/O thread. |
| 163 virtual URLRequestContext* GetRequestContext() = 0; | 163 virtual URLRequestContext* GetRequestContext() = 0; |
| 164 | 164 |
| 165 // Returns the request context for media resources asociated with this |
| 166 // profile. |
| 167 virtual URLRequestContext* GetRequestContextForMedia() = 0; |
| 168 |
| 165 // Returns the session service for this profile. This may return NULL. If | 169 // Returns the session service for this profile. This may return NULL. If |
| 166 // this profile supports a session service (it isn't off the record), and | 170 // this profile supports a session service (it isn't off the record), and |
| 167 // the session service hasn't yet been created, this forces creation of | 171 // the session service hasn't yet been created, this forces creation of |
| 168 // the session service. | 172 // the session service. |
| 169 // | 173 // |
| 170 // This returns NULL in two situations: the profile is off the record, or the | 174 // This returns NULL in two situations: the profile is off the record, or the |
| 171 // session service has been explicitly shutdown (browser is exiting). Callers | 175 // session service has been explicitly shutdown (browser is exiting). Callers |
| 172 // should always check the return value for NULL. | 176 // should always check the return value for NULL. |
| 173 virtual SessionService* GetSessionService() = 0; | 177 virtual SessionService* GetSessionService() = 0; |
| 174 | 178 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 virtual SSLHostState* GetSSLHostState(); | 274 virtual SSLHostState* GetSSLHostState(); |
| 271 virtual ExtensionsService* GetExtensionsService(); | 275 virtual ExtensionsService* GetExtensionsService(); |
| 272 virtual HistoryService* GetHistoryService(ServiceAccessType sat); | 276 virtual HistoryService* GetHistoryService(ServiceAccessType sat); |
| 273 virtual WebDataService* GetWebDataService(ServiceAccessType sat); | 277 virtual WebDataService* GetWebDataService(ServiceAccessType sat); |
| 274 virtual PrefService* GetPrefs(); | 278 virtual PrefService* GetPrefs(); |
| 275 virtual TemplateURLModel* GetTemplateURLModel(); | 279 virtual TemplateURLModel* GetTemplateURLModel(); |
| 276 virtual TemplateURLFetcher* GetTemplateURLFetcher(); | 280 virtual TemplateURLFetcher* GetTemplateURLFetcher(); |
| 277 virtual DownloadManager* GetDownloadManager(); | 281 virtual DownloadManager* GetDownloadManager(); |
| 278 virtual bool HasCreatedDownloadManager() const; | 282 virtual bool HasCreatedDownloadManager() const; |
| 279 virtual URLRequestContext* GetRequestContext(); | 283 virtual URLRequestContext* GetRequestContext(); |
| 284 virtual URLRequestContext* GetRequestContextForMedia(); |
| 280 virtual SessionService* GetSessionService(); | 285 virtual SessionService* GetSessionService(); |
| 281 virtual void ShutdownSessionService(); | 286 virtual void ShutdownSessionService(); |
| 282 virtual bool HasSessionService() const; | 287 virtual bool HasSessionService() const; |
| 283 virtual std::wstring GetName(); | 288 virtual std::wstring GetName(); |
| 284 virtual void SetName(const std::wstring& name); | 289 virtual void SetName(const std::wstring& name); |
| 285 virtual std::wstring GetID(); | 290 virtual std::wstring GetID(); |
| 286 virtual void SetID(const std::wstring& id); | 291 virtual void SetID(const std::wstring& id); |
| 287 virtual bool DidLastSessionExitCleanly(); | 292 virtual bool DidLastSessionExitCleanly(); |
| 288 virtual BookmarkModel* GetBookmarkModel(); | 293 virtual BookmarkModel* GetBookmarkModel(); |
| 289 virtual bool IsSameProfile(Profile* profile); | 294 virtual bool IsSameProfile(Profile* profile); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; | 340 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; |
| 336 scoped_ptr<TemplateURLModel> template_url_model_; | 341 scoped_ptr<TemplateURLModel> template_url_model_; |
| 337 scoped_ptr<BookmarkModel> bookmark_bar_model_; | 342 scoped_ptr<BookmarkModel> bookmark_bar_model_; |
| 338 | 343 |
| 339 #ifdef CHROME_PERSONALIZATION | 344 #ifdef CHROME_PERSONALIZATION |
| 340 scoped_ptr<ProfilePersonalization> personalization_; | 345 scoped_ptr<ProfilePersonalization> personalization_; |
| 341 #endif | 346 #endif |
| 342 | 347 |
| 343 ChromeURLRequestContext* request_context_; | 348 ChromeURLRequestContext* request_context_; |
| 344 | 349 |
| 350 ChromeURLRequestContext* media_request_context_; |
| 351 |
| 345 scoped_refptr<DownloadManager> download_manager_; | 352 scoped_refptr<DownloadManager> download_manager_; |
| 346 scoped_refptr<HistoryService> history_service_; | 353 scoped_refptr<HistoryService> history_service_; |
| 347 scoped_refptr<WebDataService> web_data_service_; | 354 scoped_refptr<WebDataService> web_data_service_; |
| 348 scoped_refptr<SessionService> session_service_; | 355 scoped_refptr<SessionService> session_service_; |
| 349 bool history_service_created_; | 356 bool history_service_created_; |
| 350 bool created_web_data_service_; | 357 bool created_web_data_service_; |
| 351 bool created_download_manager_; | 358 bool created_download_manager_; |
| 352 // Whether or not the last session exited cleanly. This is set only once. | 359 // Whether or not the last session exited cleanly. This is set only once. |
| 353 bool last_session_exited_cleanly_; | 360 bool last_session_exited_cleanly_; |
| 354 | 361 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 #endif | 393 #endif |
| 387 | 394 |
| 388 // This struct is used to pass the spellchecker object through the notification | 395 // This struct is used to pass the spellchecker object through the notification |
| 389 // NOTIFY_SPELLCHECKER_REINITIALIZED. This is used as the details for the | 396 // NOTIFY_SPELLCHECKER_REINITIALIZED. This is used as the details for the |
| 390 // notification service. | 397 // notification service. |
| 391 struct SpellcheckerReinitializedDetails { | 398 struct SpellcheckerReinitializedDetails { |
| 392 scoped_refptr<SpellChecker> spellchecker; | 399 scoped_refptr<SpellChecker> spellchecker; |
| 393 }; | 400 }; |
| 394 | 401 |
| 395 #endif // CHROME_BROWSER_PROFILE_H_ | 402 #endif // CHROME_BROWSER_PROFILE_H_ |
| OLD | NEW |