Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: chrome/browser/profile.h

Issue 332006: Remove the restriction that ChromeURLRequestContextGetter needs to be release... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync to latest changes Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/external_tab_container.cc ('k') | chrome/browser/profile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // time. 109 // time.
110 static void RegisterUserPrefs(PrefService* prefs); 110 static void RegisterUserPrefs(PrefService* prefs);
111 111
112 // Create a new profile given a path. 112 // Create a new profile given a path.
113 static Profile* CreateProfile(const FilePath& path); 113 static Profile* CreateProfile(const FilePath& path);
114 114
115 // Returns the request context for the "default" profile. This may be called 115 // Returns the request context for the "default" profile. This may be called
116 // from any thread. This CAN return NULL if a first request context has not 116 // from any thread. This CAN return NULL if a first request context has not
117 // yet been created. If necessary, listen on the UI thread for 117 // yet been created. If necessary, listen on the UI thread for
118 // NOTIFY_DEFAULT_REQUEST_CONTEXT_AVAILABLE. 118 // NOTIFY_DEFAULT_REQUEST_CONTEXT_AVAILABLE.
119 //
120 // The returned object is ref'd by the profile. Callers who AddRef() it (to
121 // keep it alive longer than the profile) must Release() it on the I/O thread.
122 static URLRequestContextGetter* GetDefaultRequestContext(); 119 static URLRequestContextGetter* GetDefaultRequestContext();
123 120
124 // Returns a unique Id that can be used to identify this profile at runtime. 121 // Returns a unique Id that can be used to identify this profile at runtime.
125 // This Id is not persistent and will not survive a restart of the browser. 122 // This Id is not persistent and will not survive a restart of the browser.
126 virtual ProfileId GetRuntimeId() = 0; 123 virtual ProfileId GetRuntimeId() = 0;
127 124
128 // Returns the path of the directory where this profile's data is stored. 125 // Returns the path of the directory where this profile's data is stored.
129 virtual FilePath GetPath() = 0; 126 virtual FilePath GetPath() = 0;
130 127
131 // Return whether this profile is off the record. Default is false. 128 // Return whether this profile is off the record. Default is false.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 virtual Extension* GetTheme() = 0; 268 virtual Extension* GetTheme() = 0;
272 269
273 // Returns or creates the ThemeProvider associated with this profile 270 // Returns or creates the ThemeProvider associated with this profile
274 virtual ThemeProvider* GetThemeProvider() = 0; 271 virtual ThemeProvider* GetThemeProvider() = 0;
275 272
276 virtual ThumbnailStore* GetThumbnailStore() = 0; 273 virtual ThumbnailStore* GetThumbnailStore() = 0;
277 274
278 // Returns the request context information associated with this profile. Call 275 // Returns the request context information associated with this profile. Call
279 // this only on the UI thread, since it can send notifications that should 276 // this only on the UI thread, since it can send notifications that should
280 // happen on the UI thread. 277 // happen on the UI thread.
281 //
282 // The returned object is ref'd by the profile. Callers who AddRef() it (to
283 // keep it alive longer than the profile) must Release() it on the I/O thread.
284 virtual URLRequestContextGetter* GetRequestContext() = 0; 278 virtual URLRequestContextGetter* GetRequestContext() = 0;
285 279
286 // Returns the request context for media resources asociated with this 280 // Returns the request context for media resources asociated with this
287 // profile. 281 // profile.
288 virtual URLRequestContextGetter* GetRequestContextForMedia() = 0; 282 virtual URLRequestContextGetter* GetRequestContextForMedia() = 0;
289 283
290 // Returns the request context used for extension-related requests. This 284 // Returns the request context used for extension-related requests. This
291 // is only used for a separate cookie store currently. 285 // is only used for a separate cookie store currently.
292 virtual URLRequestContextGetter* GetRequestContextForExtensions() = 0; 286 virtual URLRequestContextGetter* GetRequestContextForExtensions() = 0;
293 287
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 strict_transport_security_persister_; 535 strict_transport_security_persister_;
542 scoped_ptr<PrefService> prefs_; 536 scoped_ptr<PrefService> prefs_;
543 scoped_refptr<ThumbnailStore> thumbnail_store_; 537 scoped_refptr<ThumbnailStore> thumbnail_store_;
544 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; 538 scoped_ptr<TemplateURLFetcher> template_url_fetcher_;
545 scoped_ptr<TemplateURLModel> template_url_model_; 539 scoped_ptr<TemplateURLModel> template_url_model_;
546 scoped_ptr<BookmarkModel> bookmark_bar_model_; 540 scoped_ptr<BookmarkModel> bookmark_bar_model_;
547 scoped_refptr<WebResourceService> web_resource_service_; 541 scoped_refptr<WebResourceService> web_resource_service_;
548 542
549 scoped_ptr<ProfileSyncService> sync_service_; 543 scoped_ptr<ProfileSyncService> sync_service_;
550 544
551 ChromeURLRequestContextGetter* request_context_; 545 scoped_refptr<ChromeURLRequestContextGetter> request_context_;
552 546
553 ChromeURLRequestContextGetter* media_request_context_; 547 scoped_refptr<ChromeURLRequestContextGetter> media_request_context_;
554 548
555 ChromeURLRequestContextGetter* extensions_request_context_; 549 scoped_refptr<ChromeURLRequestContextGetter> extensions_request_context_;
556 550
557 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; 551 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_;
558 552
559 scoped_ptr<Blacklist> blacklist_; 553 scoped_ptr<Blacklist> blacklist_;
560 554
561 scoped_refptr<DownloadManager> download_manager_; 555 scoped_refptr<DownloadManager> download_manager_;
562 scoped_refptr<HistoryService> history_service_; 556 scoped_refptr<HistoryService> history_service_;
563 scoped_refptr<FaviconService> favicon_service_; 557 scoped_refptr<FaviconService> favicon_service_;
564 scoped_ptr<SearchVersusNavigateClassifier> search_versus_navigate_classifier_; 558 scoped_ptr<SearchVersusNavigateClassifier> search_versus_navigate_classifier_;
565 scoped_refptr<WebDataService> web_data_service_; 559 scoped_refptr<WebDataService> web_data_service_;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 }; 609 };
616 610
617 // This struct is used to pass the spellchecker object through the notification 611 // This struct is used to pass the spellchecker object through the notification
618 // SPELLCHECKER_REINITIALIZED. This is used as the details for the notification 612 // SPELLCHECKER_REINITIALIZED. This is used as the details for the notification
619 // service. 613 // service.
620 struct SpellcheckerReinitializedDetails { 614 struct SpellcheckerReinitializedDetails {
621 scoped_refptr<SpellChecker> spellchecker; 615 scoped_refptr<SpellChecker> spellchecker;
622 }; 616 };
623 617
624 #endif // CHROME_BROWSER_PROFILE_H_ 618 #endif // CHROME_BROWSER_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/browser/external_tab_container.cc ('k') | chrome/browser/profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698