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

Unified Diff: chrome/browser/extensions/extension_event_router_forwarder.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/extensions/extension_event_router_forwarder.cc
===================================================================
--- chrome/browser/extensions/extension_event_router_forwarder.cc (revision 92309)
+++ chrome/browser/extensions/extension_event_router_forwarder.cc (working copy)
@@ -25,12 +25,12 @@
void ExtensionEventRouterForwarder::DispatchEventToRenderers(
const std::string& event_name,
const std::string& event_args,
- ProfileId profile_id,
+ void* profile,
bool use_profile_to_restrict_events,
const GURL& event_url) {
- if (profile_id == Profile::kInvalidProfileId)
+ if (!profile)
return;
- HandleEvent("", event_name, event_args, profile_id,
+ HandleEvent("", event_name, event_args, profile,
use_profile_to_restrict_events, event_url);
}
@@ -46,12 +46,12 @@
const std::string& extension_id,
const std::string& event_name,
const std::string& event_args,
- ProfileId profile_id,
+ void* profile,
bool use_profile_to_restrict_events,
const GURL& event_url) {
- if (profile_id == Profile::kInvalidProfileId)
+ if (!profile)
return;
- HandleEvent(extension_id, event_name, event_args, profile_id,
+ HandleEvent(extension_id, event_name, event_args, profile,
use_profile_to_restrict_events, event_url);
}
@@ -59,7 +59,7 @@
const std::string& extension_id,
const std::string& event_name,
const std::string& event_args,
- ProfileId profile_id,
+ void* profile_ptr,
bool use_profile_to_restrict_events,
const GURL& event_url) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
@@ -68,7 +68,7 @@
NewRunnableMethod(
this,
&ExtensionEventRouterForwarder::HandleEvent,
- extension_id, event_name, event_args, profile_id,
+ extension_id, event_name, event_args, profile_ptr,
use_profile_to_restrict_events, event_url));
return;
}
@@ -78,9 +78,9 @@
ProfileManager* profile_manager = g_browser_process->profile_manager();
Profile* profile = NULL;
- if (profile_id != Profile::kInvalidProfileId) {
- profile = profile_manager->GetProfileWithId(profile_id);
- if (!profile)
+ if (profile_ptr) {
+ profile = reinterpret_cast<Profile*>(profile_ptr);
+ if (!profile_manager->IsValidProfile(profile))
return;
}
if (profile) {

Powered by Google App Engine
This is Rietveld 408576698