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

Unified Diff: chrome/browser/profile.h

Issue 261012: Committing change 255087 for Roger:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browsing_instance.cc ('k') | chrome/browser/profile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile.h
===================================================================
--- chrome/browser/profile.h (revision 28270)
+++ chrome/browser/profile.h (working copy)
@@ -60,6 +60,8 @@
class WebDataService;
class WebKitContext;
+typedef intptr_t ProfileId;
+
class Profile {
public:
// Profile services are accessed with the following parameter. This parameter
@@ -86,6 +88,10 @@
// off the record mode.
IMPLICIT_ACCESS
};
+
+ // Value that represents no profile Id.
+ static const ProfileId InvalidProfileId;
+
Profile() : restored_last_session_(false) {}
virtual ~Profile() {}
@@ -105,6 +111,10 @@
// keep it alive longer than the profile) must Release() it on the I/O thread.
static URLRequestContext* GetDefaultRequestContext();
+ // Returns a unique Id that can be used to identify this profile at runtime.
+ // This Id is not persistent and will not survive a restart of the browser.
+ virtual ProfileId GetRuntimeId() = 0;
+
// Returns the path of the directory where this profile's data is stored.
virtual FilePath GetPath() = 0;
@@ -371,6 +381,7 @@
virtual ~ProfileImpl();
// Profile implementation.
+ virtual ProfileId GetRuntimeId();
virtual FilePath GetPath();
virtual bool IsOffTheRecord();
virtual Profile* GetOffTheRecordProfile();
@@ -537,19 +548,6 @@
DISALLOW_COPY_AND_ASSIGN(ProfileImpl);
};
-#if defined(COMPILER_GCC)
-namespace __gnu_cxx {
-
-template<>
-struct hash<Profile*> {
- std::size_t operator()(Profile* const& p) const {
- return reinterpret_cast<std::size_t>(p);
- }
-};
-
-} // namespace __gnu_cxx
-#endif
-
// This struct is used to pass the spellchecker object through the notification
// SPELLCHECKER_REINITIALIZED. This is used as the details for the notification
// service.
« no previous file with comments | « chrome/browser/browsing_instance.cc ('k') | chrome/browser/profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698