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

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: Update ProtocolHandlerRegistry to be a ProfileKeyedService in lieu of a refcounted pointer. Created 8 years, 6 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 #pragma once 9 #pragma once
10 10
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 // Returns the SSLConfigService for this profile. 289 // Returns the SSLConfigService for this profile.
290 virtual net::SSLConfigService* GetSSLConfigService() = 0; 290 virtual net::SSLConfigService* GetSSLConfigService() = 0;
291 291
292 // Returns the Hostname <-> Content settings map for this profile. 292 // Returns the Hostname <-> Content settings map for this profile.
293 virtual HostContentSettingsMap* GetHostContentSettingsMap() = 0; 293 virtual HostContentSettingsMap* GetHostContentSettingsMap() = 0;
294 294
295 // Returns the BookmarkModel, creating if not yet created. 295 // Returns the BookmarkModel, creating if not yet created.
296 virtual BookmarkModel* GetBookmarkModel() = 0; 296 virtual BookmarkModel* GetBookmarkModel() = 0;
297 297
298 // Returns the ProtocolHandlerRegistry, creating if not yet created. 298 // Returns the ProtocolHandlerRegistry, creating if not yet created.
299 // TODO(smckay): replace this with access via ProtocolHandlerRegistryFactory.
299 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() = 0; 300 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() = 0;
300 301
301 // Return whether 2 profiles are the same. 2 profiles are the same if they 302 // Return whether 2 profiles are the same. 2 profiles are the same if they
302 // represent the same profile. This can happen if there is pointer equality 303 // represent the same profile. This can happen if there is pointer equality
303 // or if one profile is the incognito version of another profile (or vice 304 // or if one profile is the incognito version of another profile (or vice
304 // versa). 305 // versa).
305 virtual bool IsSameProfile(Profile* profile) = 0; 306 virtual bool IsSameProfile(Profile* profile) = 0;
306 307
307 // Returns the time the profile was started. This is not the time the profile 308 // Returns the time the profile was started. This is not the time the profile
308 // was created, rather it is the time the user started chrome and logged into 309 // was created, rather it is the time the user started chrome and logged into
309 // this profile. For the single profile case, this corresponds to the time 310 // this profile. For the single profile case, this corresponds to the time
310 // the user started chrome. 311 // the user started chrome.
311 virtual base::Time GetStartTime() const = 0; 312 virtual base::Time GetStartTime() const = 0;
312 313
313 // Marks the profile as cleanly shutdown. 314 // Marks the profile as cleanly shutdown.
314 // 315 //
315 // NOTE: this is invoked internally on a normal shutdown, but is public so 316 // NOTE: this is invoked internally on a normal shutdown, but is public so
316 // that it can be invoked when the user logs out/powers down (WM_ENDSESSION). 317 // that it can be invoked when the user logs out/powers down (WM_ENDSESSION).
317 virtual void MarkAsCleanShutdown() = 0; 318 virtual void MarkAsCleanShutdown() = 0;
318 319
319 // Start up service that gathers data from a promo resource feed. 320 // Start up service that gathers data from a promo resource feed.
320 virtual void InitPromoResources() = 0; 321 virtual void InitPromoResources() = 0;
321 322
322 // Register URLRequestFactories for protocols registered with 323 // Register URLRequestFactories for protocols registered with
323 // registerProtocolHandler. 324 // registerProtocolHandler.
325 // TODO(smckay): determine if this is ever called publicly, else
326 // we can nuke this interface element and internalize the calls.
324 virtual void InitRegisteredProtocolHandlers() = 0; 327 virtual void InitRegisteredProtocolHandlers() = 0;
325 328
326 // Returns the last directory that was chosen for uploading or opening a file. 329 // Returns the last directory that was chosen for uploading or opening a file.
327 virtual FilePath last_selected_directory() = 0; 330 virtual FilePath last_selected_directory() = 0;
328 virtual void set_last_selected_directory(const FilePath& path) = 0; 331 virtual void set_last_selected_directory(const FilePath& path) = 0;
329 332
330 #if defined(OS_CHROMEOS) 333 #if defined(OS_CHROMEOS)
331 enum AppLocaleChangedVia { 334 enum AppLocaleChangedVia {
332 // Caused by chrome://settings change. 335 // Caused by chrome://settings change.
333 APP_LOCALE_CHANGED_VIA_SETTINGS, 336 APP_LOCALE_CHANGED_VIA_SETTINGS,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 struct hash<Profile*> { 453 struct hash<Profile*> {
451 std::size_t operator()(Profile* const& p) const { 454 std::size_t operator()(Profile* const& p) const {
452 return reinterpret_cast<std::size_t>(p); 455 return reinterpret_cast<std::size_t>(p);
453 } 456 }
454 }; 457 };
455 458
456 } // namespace BASE_HASH_NAMESPACE 459 } // namespace BASE_HASH_NAMESPACE
457 #endif 460 #endif
458 461
459 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ 462 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698