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

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: Merged to LKGR to run try bots. 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 class SpeechRecognizer; 47 class SpeechRecognizer;
48 } 48 }
49 49
50 namespace chrome_browser_net { 50 namespace chrome_browser_net {
51 class Predictor; 51 class Predictor;
52 } 52 }
53 53
54 class AutocompleteClassifier; 54 class AutocompleteClassifier;
55 class BookmarkModel; 55 class BookmarkModel;
56 class ChromeAppCacheService; 56 class ChromeAppCacheService;
57 class ChromeDownloadManagerDelegate;
58 class ChromeURLDataManager; 57 class ChromeURLDataManager;
59 class Extension; 58 class Extension;
60 class ExtensionDevToolsManager; 59 class ExtensionDevToolsManager;
61 class ExtensionEventRouter; 60 class ExtensionEventRouter;
62 class ExtensionInfoMap; 61 class ExtensionInfoMap;
63 class ExtensionMessageService; 62 class ExtensionMessageService;
64 class ExtensionPrefValueMap; 63 class ExtensionPrefValueMap;
65 class ExtensionProcessManager; 64 class ExtensionProcessManager;
66 class ExtensionService; 65 class ExtensionService;
67 class ExtensionSpecialStoragePolicy; 66 class ExtensionSpecialStoragePolicy;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 static Profile* FromBrowserContext(content::BrowserContext* browser_context); 183 static Profile* FromBrowserContext(content::BrowserContext* browser_context);
185 184
186 // Returns the profile corresponding to the given WebUI. 185 // Returns the profile corresponding to the given WebUI.
187 static Profile* FromWebUI(WebUI* web_ui); 186 static Profile* FromWebUI(WebUI* web_ui);
188 187
189 // content::BrowserContext implementation ------------------------------------ 188 // content::BrowserContext implementation ------------------------------------
190 189
191 virtual FilePath GetPath() = 0; 190 virtual FilePath GetPath() = 0;
192 virtual SSLHostState* GetSSLHostState() = 0; 191 virtual SSLHostState* GetSSLHostState() = 0;
193 virtual DownloadManager* GetDownloadManager() = 0; 192 virtual DownloadManager* GetDownloadManager() = 0;
194 virtual bool HasCreatedDownloadManager() const = 0;
195 virtual net::URLRequestContextGetter* GetRequestContext() = 0; 193 virtual net::URLRequestContextGetter* GetRequestContext() = 0;
196 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( 194 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
197 int renderer_child_id) = 0; 195 int renderer_child_id) = 0;
198 virtual net::URLRequestContextGetter* GetRequestContextForMedia() = 0; 196 virtual net::URLRequestContextGetter* GetRequestContextForMedia() = 0;
199 virtual const content::ResourceContext& GetResourceContext() = 0; 197 virtual const content::ResourceContext& GetResourceContext() = 0;
200 virtual HostZoomMap* GetHostZoomMap() = 0; 198 virtual HostZoomMap* GetHostZoomMap() = 0;
201 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0; 199 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0;
202 virtual SpeechInputPreferences* GetSpeechInputPreferences() = 0; 200 virtual SpeechInputPreferences* GetSpeechInputPreferences() = 0;
203 virtual quota::QuotaManager* GetQuotaManager() = 0; 201 virtual quota::QuotaManager* GetQuotaManager() = 0;
204 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0; 202 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0;
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 535
538 // Creates an OffTheRecordProfile which points to this Profile. 536 // Creates an OffTheRecordProfile which points to this Profile.
539 Profile* CreateOffTheRecordProfile(); 537 Profile* CreateOffTheRecordProfile();
540 538
541 protected: 539 protected:
542 friend class OffTheRecordProfileImpl; 540 friend class OffTheRecordProfileImpl;
543 541
544 static net::URLRequestContextGetter* default_request_context_; 542 static net::URLRequestContextGetter* default_request_context_;
545 543
546 private: 544 private:
547 friend class DownloadTest;
548
549 // Allow replacement of the download manager delegate, for interposition
550 // on browser tests. Note that this takes ownership of |delegate|.
551 virtual void SetDownloadManagerDelegate(
552 ChromeDownloadManagerDelegate* delegate) = 0;
553
554 // ***DEPRECATED**: You should be passing in the specific profile's 545 // ***DEPRECATED**: You should be passing in the specific profile's
555 // URLRequestContextGetter or using the system URLRequestContextGetter. 546 // URLRequestContextGetter or using the system URLRequestContextGetter.
556 // 547 //
557 // Returns the request context for the "default" profile. This may be called 548 // Returns the request context for the "default" profile. This may be called
558 // from any thread. This CAN return NULL if a first request context has not 549 // from any thread. This CAN return NULL if a first request context has not
559 // yet been created. If necessary, listen on the UI thread for 550 // yet been created. If necessary, listen on the UI thread for
560 // NOTIFY_DEFAULT_REQUEST_CONTEXT_AVAILABLE. 551 // NOTIFY_DEFAULT_REQUEST_CONTEXT_AVAILABLE.
561 static net::URLRequestContextGetter* GetDefaultRequestContext(); 552 static net::URLRequestContextGetter* GetDefaultRequestContext();
562 553
563 bool restored_last_session_; 554 bool restored_last_session_;
(...skipping 12 matching lines...) Expand all
576 struct hash<Profile*> { 567 struct hash<Profile*> {
577 std::size_t operator()(Profile* const& p) const { 568 std::size_t operator()(Profile* const& p) const {
578 return reinterpret_cast<std::size_t>(p); 569 return reinterpret_cast<std::size_t>(p);
579 } 570 }
580 }; 571 };
581 572
582 } // namespace __gnu_cxx 573 } // namespace __gnu_cxx
583 #endif 574 #endif
584 575
585 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ 576 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698