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

Unified Diff: chrome/browser/ui/views/extensions/browser_action_drag_data.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
Index: chrome/browser/ui/views/extensions/browser_action_drag_data.cc
===================================================================
--- chrome/browser/ui/views/extensions/browser_action_drag_data.cc (revision 92309)
+++ chrome/browser/ui/views/extensions/browser_action_drag_data.cc (working copy)
@@ -13,16 +13,16 @@
"chromium/x-browser-actions";
BrowserActionDragData::BrowserActionDragData()
- : profile_id_(0), index_(-1) {
+ : profile_(NULL), index_(-1) {
}
BrowserActionDragData::BrowserActionDragData(
const std::string& id, int index)
- : profile_id_(0), id_(id), index_(index) {
+ : profile_(NULL), id_(id), index_(index) {
}
bool BrowserActionDragData::IsFromProfile(Profile* profile) const {
- return (profile_id_ == profile->GetRuntimeId());
+ return profile_ == profile;
}
#if defined(TOOLKIT_VIEWS)
@@ -65,8 +65,7 @@
void BrowserActionDragData::WriteToPickle(
Profile* profile, Pickle* pickle) const {
- ProfileId profile_id = profile->GetRuntimeId();
- pickle->WriteBytes(&profile_id, sizeof(profile_id));
+ pickle->WriteBytes(&profile, sizeof(profile));
pickle->WriteString(id_);
pickle->WriteSize(index_);
}
@@ -75,9 +74,9 @@
void* data_iterator = NULL;
const char* tmp;
- if (!pickle->ReadBytes(&data_iterator, &tmp, sizeof(profile_id_)))
+ if (!pickle->ReadBytes(&data_iterator, &tmp, sizeof(profile_)))
return false;
- memcpy(&profile_id_, tmp, sizeof(profile_id_));
+ memcpy(&profile_, tmp, sizeof(profile_));
if (!pickle->ReadString(&data_iterator, &id_))
return false;

Powered by Google App Engine
This is Rietveld 408576698