Index: chrome/browser/metrics/extensions_metrics_provider_unittest.cc |
diff --git a/chrome/browser/metrics/extensions_metrics_provider_unittest.cc b/chrome/browser/metrics/extensions_metrics_provider_unittest.cc |
index f0fc87e2d68fc2cab17ff7a4eb5721758a430a3a..157ab5255ef27d2db71ff7a44aa17d1e5fac645b 100644 |
--- a/chrome/browser/metrics/extensions_metrics_provider_unittest.cc |
+++ b/chrome/browser/metrics/extensions_metrics_provider_unittest.cc |
@@ -6,7 +6,9 @@ |
#include <string> |
+#include "base/memory/scoped_ptr.h" |
#include "base/prefs/testing_pref_service.h" |
+#include "components/metrics/client_info.h" |
#include "components/metrics/metrics_state_manager.h" |
#include "components/metrics/proto/system_profile.pb.h" |
#include "extensions/common/extension.h" |
@@ -20,6 +22,13 @@ bool IsMetricsReportingEnabled() { |
return true; |
} |
+void StoreNoClientInfoBackup(const metrics::ClientInfo& /* client_info */) { |
+} |
+ |
+scoped_ptr<metrics::ClientInfo> ReturnNoBackup() { |
+ return scoped_ptr<metrics::ClientInfo>(); |
+} |
+ |
class TestExtensionsMetricsProvider : public ExtensionsMetricsProvider { |
public: |
explicit TestExtensionsMetricsProvider( |
@@ -95,8 +104,11 @@ TEST(ExtensionsMetricsProvider, SystemProtoEncoding) { |
TestingPrefServiceSimple local_state; |
metrics::MetricsStateManager::RegisterPrefs(local_state.registry()); |
scoped_ptr<metrics::MetricsStateManager> metrics_state_manager( |
- metrics::MetricsStateManager::Create(&local_state, |
- base::Bind(&IsMetricsReportingEnabled))); |
+ metrics::MetricsStateManager::Create( |
+ &local_state, |
+ base::Bind(&IsMetricsReportingEnabled), |
+ base::Bind(&StoreNoClientInfoBackup), |
+ base::Bind(&ReturnNoBackup))); |
TestExtensionsMetricsProvider extension_metrics(metrics_state_manager.get()); |
extension_metrics.ProvideSystemProfileMetrics(&system_profile); |
ASSERT_EQ(2, system_profile.occupied_extension_bucket_size()); |