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

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

Issue 10546083: Convert ProtocolHandlerRegistry to be a ProfileKeyedService. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Minor docu-changes. Created 8 years, 5 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
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 9
10 #include <string> 10 #include <string>
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // Returns the SSLConfigService for this profile. 276 // Returns the SSLConfigService for this profile.
277 virtual net::SSLConfigService* GetSSLConfigService() = 0; 277 virtual net::SSLConfigService* GetSSLConfigService() = 0;
278 278
279 // Returns the Hostname <-> Content settings map for this profile. 279 // Returns the Hostname <-> Content settings map for this profile.
280 virtual HostContentSettingsMap* GetHostContentSettingsMap() = 0; 280 virtual HostContentSettingsMap* GetHostContentSettingsMap() = 0;
281 281
282 // Returns the BookmarkModel, creating if not yet created. 282 // Returns the BookmarkModel, creating if not yet created.
283 virtual BookmarkModel* GetBookmarkModel() = 0; 283 virtual BookmarkModel* GetBookmarkModel() = 0;
284 284
285 // Returns the ProtocolHandlerRegistry, creating if not yet created. 285 // Returns the ProtocolHandlerRegistry, creating if not yet created.
286 // TODO(smckay): replace this with access via ProtocolHandlerRegistryFactory.
286 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() = 0; 287 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() = 0;
287 288
288 // Return whether 2 profiles are the same. 2 profiles are the same if they 289 // Return whether 2 profiles are the same. 2 profiles are the same if they
289 // represent the same profile. This can happen if there is pointer equality 290 // represent the same profile. This can happen if there is pointer equality
290 // or if one profile is the incognito version of another profile (or vice 291 // or if one profile is the incognito version of another profile (or vice
291 // versa). 292 // versa).
292 virtual bool IsSameProfile(Profile* profile) = 0; 293 virtual bool IsSameProfile(Profile* profile) = 0;
293 294
294 // Returns the time the profile was started. This is not the time the profile 295 // Returns the time the profile was started. This is not the time the profile
295 // was created, rather it is the time the user started chrome and logged into 296 // was created, rather it is the time the user started chrome and logged into
296 // this profile. For the single profile case, this corresponds to the time 297 // this profile. For the single profile case, this corresponds to the time
297 // the user started chrome. 298 // the user started chrome.
298 virtual base::Time GetStartTime() const = 0; 299 virtual base::Time GetStartTime() const = 0;
299 300
300 // Marks the profile as cleanly shutdown. 301 // Marks the profile as cleanly shutdown.
301 // 302 //
302 // NOTE: this is invoked internally on a normal shutdown, but is public so 303 // NOTE: this is invoked internally on a normal shutdown, but is public so
303 // that it can be invoked when the user logs out/powers down (WM_ENDSESSION). 304 // that it can be invoked when the user logs out/powers down (WM_ENDSESSION).
304 virtual void MarkAsCleanShutdown() = 0; 305 virtual void MarkAsCleanShutdown() = 0;
305 306
306 // Start up service that gathers data from a promo resource feed. 307 // Start up service that gathers data from a promo resource feed.
307 virtual void InitPromoResources() = 0; 308 virtual void InitPromoResources() = 0;
308 309
309 // Register URLRequestFactories for protocols registered with
310 // registerProtocolHandler.
311 virtual void InitRegisteredProtocolHandlers() = 0;
312
313 // Returns the last directory that was chosen for uploading or opening a file. 310 // Returns the last directory that was chosen for uploading or opening a file.
314 virtual FilePath last_selected_directory() = 0; 311 virtual FilePath last_selected_directory() = 0;
315 virtual void set_last_selected_directory(const FilePath& path) = 0; 312 virtual void set_last_selected_directory(const FilePath& path) = 0;
316 313
317 #if defined(OS_CHROMEOS) 314 #if defined(OS_CHROMEOS)
318 enum AppLocaleChangedVia { 315 enum AppLocaleChangedVia {
319 // Caused by chrome://settings change. 316 // Caused by chrome://settings change.
320 APP_LOCALE_CHANGED_VIA_SETTINGS, 317 APP_LOCALE_CHANGED_VIA_SETTINGS,
321 // Locale has been reverted via LocaleChangeGuard. 318 // Locale has been reverted via LocaleChangeGuard.
322 APP_LOCALE_CHANGED_VIA_REVERT, 319 APP_LOCALE_CHANGED_VIA_REVERT,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 struct hash<Profile*> { 423 struct hash<Profile*> {
427 std::size_t operator()(Profile* const& p) const { 424 std::size_t operator()(Profile* const& p) const {
428 return reinterpret_cast<std::size_t>(p); 425 return reinterpret_cast<std::size_t>(p);
429 } 426 }
430 }; 427 };
431 428
432 } // namespace BASE_HASH_NAMESPACE 429 } // namespace BASE_HASH_NAMESPACE
433 #endif 430 #endif
434 431
435 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ 432 #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_dependency_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698