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

Unified Diff: chrome/browser/dom_ui/app_launcher_handler.cc

Issue 6544023: Fix crashes in ExtensionService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment/TODO Created 9 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 | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/app_launcher_handler.cc
diff --git a/chrome/browser/dom_ui/app_launcher_handler.cc b/chrome/browser/dom_ui/app_launcher_handler.cc
index 25706503c109115011780ea578a50934bcc1bfe1..8caa392df96ed79332448b1b74c63e702817f802 100644
--- a/chrome/browser/dom_ui/app_launcher_handler.cc
+++ b/chrome/browser/dom_ui/app_launcher_handler.cc
@@ -470,7 +470,10 @@ void AppLauncherHandler::RecordAppLaunchByURL(
CHECK(bucket != extension_misc::APP_LAUNCH_BUCKET_INVALID);
GURL url(UnescapeURLComponent(escaped_url, kUnescapeRules));
- if (!profile->GetExtensionService()->IsInstalledApp(url))
+ // TODO: the ExtensionService should never be NULL, but in some cases it is,
+ // see bug 73768. After it is resolved, the explicit test can go away.
+ ExtensionService* service = profile->GetExtensionService();
+ if (!service || !service->IsInstalledApp(url))
return;
UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram, bucket,
« no previous file with comments | « no previous file | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698