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..b18f6d99821e728d952d6cc9bd79a2187dce8501 100644 |
--- a/chrome/browser/metrics/extensions_metrics_provider_unittest.cc |
+++ b/chrome/browser/metrics/extensions_metrics_provider_unittest.cc |
@@ -6,7 +6,10 @@ |
#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_service.h" |
#include "components/metrics/metrics_state_manager.h" |
#include "components/metrics/proto/system_profile.pb.h" |
#include "extensions/common/extension.h" |
@@ -20,6 +23,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( |
@@ -93,10 +103,13 @@ TEST(ExtensionsMetricsProvider, HashExtension) { |
TEST(ExtensionsMetricsProvider, SystemProtoEncoding) { |
metrics::SystemProfileProto system_profile; |
TestingPrefServiceSimple local_state; |
- metrics::MetricsStateManager::RegisterPrefs(local_state.registry()); |
+ MetricsService::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()); |