summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.cc
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-08 14:00:11 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-08 14:00:11 +0000
commit4bf6afd4a6c3c6c506a2b846b4ebf0c2c3f27805 (patch)
tree0293e2a7dbe89dfd0fb111cd9f0ecaee73d14155 /chrome/browser/profile.cc
parent2dd1eb91fa07a6ec9a708093525834d7eab5a95e (diff)
downloadchromium_src-4bf6afd4a6c3c6c506a2b846b4ebf0c2c3f27805.zip
chromium_src-4bf6afd4a6c3c6c506a2b846b4ebf0c2c3f27805.tar.gz
chromium_src-4bf6afd4a6c3c6c506a2b846b4ebf0c2c3f27805.tar.bz2
Committing change 255087 for Roger:
TBR=amit http://codereview.chromium.org/255087 Adding a unique runtime Id to Profile objects, that can be used as the key of the ProfileSiteInstanceMap type. This is used to make sure that Profile objects can correctly share site information when one profile is derived from another. BUG=0 TEST=See unit tests Review URL: http://codereview.chromium.org/261012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28390 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r--chrome/browser/profile.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index ebf96c7..2099e99 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -147,6 +147,9 @@ static void CleanupAppCacheService(ChromeAppCacheService* appcache_service) {
}
// static
+const ProfileId Profile::InvalidProfileId = static_cast<ProfileId>(0);
+
+// static
void Profile::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterBooleanPref(prefs::kSearchSuggestEnabled, true);
prefs->RegisterBooleanPref(prefs::kSessionExitedCleanly, true);
@@ -227,6 +230,10 @@ class OffTheRecordProfileImpl : public Profile,
CleanupAppCacheService(appcache_service_);
}
+ virtual ProfileId GetRuntimeId() {
+ return reinterpret_cast<ProfileId>(this);
+ }
+
virtual FilePath GetPath() { return profile_->GetPath(); }
virtual bool IsOffTheRecord() {
@@ -798,6 +805,10 @@ ProfileImpl::~ProfileImpl() {
MarkAsCleanShutdown();
}
+ProfileId ProfileImpl::GetRuntimeId() {
+ return reinterpret_cast<ProfileId>(this);
+}
+
FilePath ProfileImpl::GetPath() {
return path_;
}