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

Unified Diff: chrome/browser/extensions/app_restore_service.cc

Issue 11275031: Add NULL check to AppRestoreService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/app_restore_service.cc
diff --git a/chrome/browser/extensions/app_restore_service.cc b/chrome/browser/extensions/app_restore_service.cc
index 6a91cc188f9aabfbb97f18a1240effc48a0edf8c..2c7307f3049c4dd1dc9d1948d4862f4064d9a4eb 100644
--- a/chrome/browser/extensions/app_restore_service.cc
+++ b/chrome/browser/extensions/app_restore_service.cc
@@ -58,17 +58,16 @@ void AppRestoreService::Observe(int type,
case chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING: {
ExtensionHost* host = content::Details<ExtensionHost>(details).ptr();
const Extension* extension = host->extension();
- if (extension && extension->is_platform_app()) {
+ if (extension && extension->is_platform_app())
RecordAppStart(extension->id());
- }
break;
}
case chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED: {
ExtensionHost* host = content::Details<ExtensionHost>(details).ptr();
- if (host->extension()->is_platform_app()) {
- RecordAppStop(host->extension()->id());
- }
+ const Extension* extension = host->extension();
+ if (extension && extension->is_platform_app())
+ RecordAppStop(extension->id());
break;
}
« 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