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

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

Issue 8135017: Refactor downloads into a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated latest rounds of comments from John. Created 9 years, 2 months 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
OLDNEW
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
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 class SpeechRecognizer; 43 class SpeechRecognizer;
44 } 44 }
45 45
46 namespace chrome_browser_net { 46 namespace chrome_browser_net {
47 class Predictor; 47 class Predictor;
48 } 48 }
49 49
50 class AutocompleteClassifier; 50 class AutocompleteClassifier;
51 class BookmarkModel; 51 class BookmarkModel;
52 class ChromeAppCacheService; 52 class ChromeAppCacheService;
53 class ChromeDownloadManagerDelegate;
54 class ChromeURLDataManager; 53 class ChromeURLDataManager;
55 class Extension; 54 class Extension;
56 class ExtensionDevToolsManager; 55 class ExtensionDevToolsManager;
57 class ExtensionEventRouter; 56 class ExtensionEventRouter;
58 class ExtensionInfoMap; 57 class ExtensionInfoMap;
59 class ExtensionMessageService; 58 class ExtensionMessageService;
60 class ExtensionPrefValueMap; 59 class ExtensionPrefValueMap;
61 class ExtensionProcessManager; 60 class ExtensionProcessManager;
62 class ExtensionService; 61 class ExtensionService;
63 class ExtensionSpecialStoragePolicy; 62 class ExtensionSpecialStoragePolicy;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 static Profile* FromBrowserContext(content::BrowserContext* browser_context); 179 static Profile* FromBrowserContext(content::BrowserContext* browser_context);
181 180
182 // Returns the profile corresponding to the given WebUI. 181 // Returns the profile corresponding to the given WebUI.
183 static Profile* FromWebUI(WebUI* web_ui); 182 static Profile* FromWebUI(WebUI* web_ui);
184 183
185 // content::BrowserContext implementation ------------------------------------ 184 // content::BrowserContext implementation ------------------------------------
186 185
187 virtual FilePath GetPath() = 0; 186 virtual FilePath GetPath() = 0;
188 virtual SSLHostState* GetSSLHostState() = 0; 187 virtual SSLHostState* GetSSLHostState() = 0;
189 virtual DownloadManager* GetDownloadManager() = 0; 188 virtual DownloadManager* GetDownloadManager() = 0;
190 virtual bool HasCreatedDownloadManager() const = 0;
191 virtual net::URLRequestContextGetter* GetRequestContext() = 0; 189 virtual net::URLRequestContextGetter* GetRequestContext() = 0;
192 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( 190 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
193 int renderer_child_id) = 0; 191 int renderer_child_id) = 0;
194 virtual net::URLRequestContextGetter* GetRequestContextForMedia() = 0; 192 virtual net::URLRequestContextGetter* GetRequestContextForMedia() = 0;
195 virtual const content::ResourceContext& GetResourceContext() = 0; 193 virtual const content::ResourceContext& GetResourceContext() = 0;
196 virtual HostZoomMap* GetHostZoomMap() = 0; 194 virtual HostZoomMap* GetHostZoomMap() = 0;
197 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0; 195 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0;
198 virtual SpeechInputPreferences* GetSpeechInputPreferences() = 0; 196 virtual SpeechInputPreferences* GetSpeechInputPreferences() = 0;
199 virtual quota::QuotaManager* GetQuotaManager() = 0; 197 virtual quota::QuotaManager* GetQuotaManager() = 0;
200 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0; 198 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0;
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 527
530 // Creates an OffTheRecordProfile which points to this Profile. 528 // Creates an OffTheRecordProfile which points to this Profile.
531 Profile* CreateOffTheRecordProfile(); 529 Profile* CreateOffTheRecordProfile();
532 530
533 protected: 531 protected:
534 friend class OffTheRecordProfileImpl; 532 friend class OffTheRecordProfileImpl;
535 533
536 static net::URLRequestContextGetter* default_request_context_; 534 static net::URLRequestContextGetter* default_request_context_;
537 535
538 private: 536 private:
539 friend class DownloadTest;
540
541 // Allow replacement of the download manager delegate, for interposition
542 // on browser tests. Note that this takes ownership of |delegate|.
543 virtual void SetDownloadManagerDelegate(
544 ChromeDownloadManagerDelegate* delegate) = 0;
545
546 // ***DEPRECATED**: You should be passing in the specific profile's 537 // ***DEPRECATED**: You should be passing in the specific profile's
547 // URLRequestContextGetter or using the system URLRequestContextGetter. 538 // URLRequestContextGetter or using the system URLRequestContextGetter.
548 // 539 //
549 // Returns the request context for the "default" profile. This may be called 540 // Returns the request context for the "default" profile. This may be called
550 // from any thread. This CAN return NULL if a first request context has not 541 // from any thread. This CAN return NULL if a first request context has not
551 // yet been created. If necessary, listen on the UI thread for 542 // yet been created. If necessary, listen on the UI thread for
552 // NOTIFY_DEFAULT_REQUEST_CONTEXT_AVAILABLE. 543 // NOTIFY_DEFAULT_REQUEST_CONTEXT_AVAILABLE.
553 static net::URLRequestContextGetter* GetDefaultRequestContext(); 544 static net::URLRequestContextGetter* GetDefaultRequestContext();
554 545
555 bool restored_last_session_; 546 bool restored_last_session_;
(...skipping 12 matching lines...) Expand all
568 struct hash<Profile*> { 559 struct hash<Profile*> {
569 std::size_t operator()(Profile* const& p) const { 560 std::size_t operator()(Profile* const& p) const {
570 return reinterpret_cast<std::size_t>(p); 561 return reinterpret_cast<std::size_t>(p);
571 } 562 }
572 }; 563 };
573 564
574 } // namespace __gnu_cxx 565 } // namespace __gnu_cxx
575 #endif 566 #endif
576 567
577 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ 568 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.cc ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698