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

Unified Diff: chrome/browser/extensions/system/system_api.cc

Issue 9604001: Fix crash during ChromeOS login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/system/system_api.cc
diff --git a/chrome/browser/extensions/system/system_api.cc b/chrome/browser/extensions/system/system_api.cc
index bdd16778f664f2e6c8d018347d61f984abcc614f..38e18a2ce6da8dff97a25cfa422eb18d8e5fa12a 100644
--- a/chrome/browser/extensions/system/system_api.cc
+++ b/chrome/browser/extensions/system/system_api.cc
@@ -50,10 +50,17 @@ const char kOnWokeUp[] = "systemPrivate.onWokeUp";
// Dispatches an extension event with |args|
void DispatchEvent(const std::string& event_name, const ListValue& args) {
+ Profile* profile = ProfileManager::GetDefaultProfile();
+ if (!profile)
+ return;
+ ExtensionEventRouter* extension_event_router =
+ profile->GetExtensionEventRouter();
+ if (!extension_event_router)
+ return;
std::string json_args;
base::JSONWriter::Write(&args, false, &json_args);
- ProfileManager::GetDefaultProfile()->GetExtensionEventRouter()->
- DispatchEventToRenderers(event_name, json_args, NULL, GURL());
+ extension_event_router->DispatchEventToRenderers(
+ event_name, json_args, NULL, GURL());
}
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698