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

Unified Diff: chrome/browser/profiles/profile.cc

Issue 7346024: Get rid of the ProfileId. It was added for ceee. I reverted the original change, since it led to ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile.cc
===================================================================
--- chrome/browser/profiles/profile.cc (revision 92309)
+++ chrome/browser/profiles/profile.cc (working copy)
@@ -82,16 +82,16 @@
namespace {
-void NotifyOTRProfileCreatedOnIOThread(ProfileId original_profile_id,
- ProfileId otr_profile_id) {
+void NotifyOTRProfileCreatedOnIOThread(void* original_profile,
+ void* otr_profile) {
ExtensionWebRequestEventRouter::GetInstance()->OnOTRProfileCreated(
- original_profile_id, otr_profile_id);
+ original_profile, otr_profile);
}
-void NotifyOTRProfileDestroyedOnIOThread(ProfileId original_profile_id,
- ProfileId otr_profile_id) {
+void NotifyOTRProfileDestroyedOnIOThread(void* original_profile,
+ void* otr_profile) {
ExtensionWebRequestEventRouter::GetInstance()->OnOTRProfileDestroyed(
- original_profile_id, otr_profile_id);
+ original_profile, otr_profile);
}
} // namespace
@@ -105,9 +105,6 @@
const char* Profile::kProfileKey = "__PROFILE__";
// static
-const ProfileId Profile::kInvalidProfileId = static_cast<ProfileId>(0);
-
-// static
void Profile::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterBooleanPref(prefs::kSearchSuggestEnabled,
true,
@@ -247,9 +244,7 @@
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
- NewRunnableFunction(
- &NotifyOTRProfileCreatedOnIOThread,
- profile_->GetRuntimeId(), GetRuntimeId()));
+ NewRunnableFunction(&NotifyOTRProfileCreatedOnIOThread, profile_, this));
}
virtual ~OffTheRecordProfileImpl() {
@@ -262,8 +257,7 @@
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
NewRunnableFunction(
- &NotifyOTRProfileDestroyedOnIOThread,
- profile_->GetRuntimeId(), GetRuntimeId()));
+ &NotifyOTRProfileDestroyedOnIOThread, profile_, this));
// Clean up all DB files/directories
if (db_tracker_) {
@@ -289,10 +283,6 @@
}
}
- virtual ProfileId GetRuntimeId() {
- return reinterpret_cast<ProfileId>(this);
- }
-
virtual std::string GetProfileName() {
// Incognito profile should not return the profile name.
return std::string();
« no previous file with comments | « chrome/browser/profiles/profile.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698