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

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

Issue 9419033: Move creation of BrowserContext objects that live in content to content, instead of depending on th… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // Same as above, but uses async initialization. 174 // Same as above, but uses async initialization.
175 static Profile* CreateProfileAsync(const FilePath& path, 175 static Profile* CreateProfileAsync(const FilePath& path,
176 Delegate* delegate); 176 Delegate* delegate);
177 177
178 // Returns the profile corresponding to the given browser context. 178 // Returns the profile corresponding to the given browser context.
179 static Profile* FromBrowserContext(content::BrowserContext* browser_context); 179 static Profile* FromBrowserContext(content::BrowserContext* browser_context);
180 180
181 // Returns the profile corresponding to the given WebUI. 181 // Returns the profile corresponding to the given WebUI.
182 static Profile* FromWebUI(content::WebUI* web_ui); 182 static Profile* FromWebUI(content::WebUI* web_ui);
183 183
184 // content::BrowserContext implementation ------------------------------------ 184 // content::BrowserContext implementation ------------------------------------
Avi (use Gerrit) 2012/02/17 16:25:09 This comment marks the end of the implementation;
jam 2012/02/17 16:29:25 Done.
185 185
186 virtual FilePath GetPath() = 0;
187 virtual content::DownloadManager* GetDownloadManager() = 0;
188 virtual net::URLRequestContextGetter* GetRequestContext() = 0;
189 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
190 int renderer_child_id) = 0;
191 virtual net::URLRequestContextGetter* GetRequestContextForMedia() = 0;
192 virtual content::ResourceContext* GetResourceContext() = 0;
193 virtual content::HostZoomMap* GetHostZoomMap() = 0;
194 virtual content::GeolocationPermissionContext*
195 GetGeolocationPermissionContext() = 0;
196 virtual content::SpeechInputPreferences* GetSpeechInputPreferences() = 0;
197 virtual quota::QuotaManager* GetQuotaManager() = 0;
198 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0;
199 virtual WebKitContext* GetWebKitContext() = 0;
200 virtual ChromeAppCacheService* GetAppCacheService() = 0;
201 virtual ChromeBlobStorageContext* GetBlobStorageContext() = 0;
202 virtual fileapi::FileSystemContext* GetFileSystemContext() = 0;
203
204 // content::BrowserContext implementation ------------------------------------
205
206 // Typesafe upcast. 186 // Typesafe upcast.
207 virtual TestingProfile* AsTestingProfile(); 187 virtual TestingProfile* AsTestingProfile();
208 188
209 // Returns the name associated with this profile. This name is displayed in 189 // Returns the name associated with this profile. This name is displayed in
210 // the browser frame. 190 // the browser frame.
211 virtual std::string GetProfileName() = 0; 191 virtual std::string GetProfileName() = 0;
212 192
213 // Return whether this profile is incognito. Default is false. 193 // Return whether this profile is incognito. Default is false.
214 virtual bool IsOffTheRecord() = 0; 194 virtual bool IsOffTheRecord() = 0;
215 195
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 352
373 // Returns the SSLConfigService for this profile. 353 // Returns the SSLConfigService for this profile.
374 virtual net::SSLConfigService* GetSSLConfigService() = 0; 354 virtual net::SSLConfigService* GetSSLConfigService() = 0;
375 355
376 // Returns the Hostname <-> Content settings map for this profile. 356 // Returns the Hostname <-> Content settings map for this profile.
377 virtual HostContentSettingsMap* GetHostContentSettingsMap() = 0; 357 virtual HostContentSettingsMap* GetHostContentSettingsMap() = 0;
378 358
379 // Returns the user style sheet watcher. 359 // Returns the user style sheet watcher.
380 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() = 0; 360 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() = 0;
381 361
382 // Returns true if the last time this profile was open it was exited cleanly.
383 virtual bool DidLastSessionExitCleanly() = 0;
384
385 // Returns the BookmarkModel, creating if not yet created. 362 // Returns the BookmarkModel, creating if not yet created.
386 virtual BookmarkModel* GetBookmarkModel() = 0; 363 virtual BookmarkModel* GetBookmarkModel() = 0;
387 364
388 // Returns the ProtocolHandlerRegistry, creating if not yet created. 365 // Returns the ProtocolHandlerRegistry, creating if not yet created.
389 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() = 0; 366 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() = 0;
390 367
391 // Returns the Gaia Token Service, creating if not yet created. 368 // Returns the Gaia Token Service, creating if not yet created.
392 virtual TokenService* GetTokenService() = 0; 369 virtual TokenService* GetTokenService() = 0;
393 370
394 // Return whether 2 profiles are the same. 2 profiles are the same if they 371 // Return whether 2 profiles are the same. 2 profiles are the same if they
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 struct hash<Profile*> { 530 struct hash<Profile*> {
554 std::size_t operator()(Profile* const& p) const { 531 std::size_t operator()(Profile* const& p) const {
555 return reinterpret_cast<std::size_t>(p); 532 return reinterpret_cast<std::size_t>(p);
556 } 533 }
557 }; 534 };
558 535
559 } // namespace BASE_HASH_NAMESPACE 536 } // namespace BASE_HASH_NAMESPACE
560 #endif 537 #endif
561 538
562 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ 539 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698