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

Unified Diff: chrome/browser/metrics/extensions_metrics_provider.cc

Issue 478753002: Readding null checks for the set of extensions returned by GetInstalledExtensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/metrics/extensions_metrics_provider.cc
diff --git a/chrome/browser/metrics/extensions_metrics_provider.cc b/chrome/browser/metrics/extensions_metrics_provider.cc
index 2fb32d4f442cf869f36fb84f827579364cc86860..41f13596bc260a33a7b966ee9a97033f694fe618 100644
--- a/chrome/browser/metrics/extensions_metrics_provider.cc
+++ b/chrome/browser/metrics/extensions_metrics_provider.cc
@@ -193,6 +193,8 @@ void ExtensionsMetricsProvider::ProvideOffStoreMetric(
scoped_ptr<extensions::ExtensionSet> extensions(
GetInstalledExtensions(profiles[i]));
+ if (!extensions)
+ continue;
// Combine the state from each profile, always favoring the higher state as
// defined by the order of ExtensionState.
@@ -212,6 +214,8 @@ void ExtensionsMetricsProvider::ProvideOccupiedBucketMetric(
scoped_ptr<extensions::ExtensionSet> extensions(
GetInstalledExtensions(profile));
+ if (!extensions)
+ return;
const int client_key = GetClientID() % kExtensionListClientKeys;
« 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