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

Unified Diff: components/metrics/metrics_service_unittest.cc

Issue 372473004: Retrieve client_id from GoogleUpdateSettings when its missing from Local State. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits:grt Created 6 years, 5 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 | « components/metrics/client_info.cc ('k') | components/metrics/metrics_state_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_service_unittest.cc
diff --git a/components/metrics/metrics_service_unittest.cc b/components/metrics/metrics_service_unittest.cc
index 694c45ae5ca588d942d1b29ce6d35562577786d9..c580287ba11a1fbee1debb150b4168e1d5b7813f 100644
--- a/components/metrics/metrics_service_unittest.cc
+++ b/components/metrics/metrics_service_unittest.cc
@@ -7,9 +7,11 @@
#include <string>
#include "base/bind.h"
+#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/prefs/testing_pref_service.h"
#include "base/threading/platform_thread.h"
+#include "components/metrics/client_info.h"
#include "components/metrics/compression_utils.h"
#include "components/metrics/metrics_log.h"
#include "components/metrics/metrics_pref_names.h"
@@ -23,6 +25,13 @@ namespace {
using metrics::MetricsLogManager;
+void StoreNoClientInfoBackup(const metrics::ClientInfo& /* client_info */) {
+}
+
+scoped_ptr<metrics::ClientInfo> ReturnNoBackup() {
+ return scoped_ptr<metrics::ClientInfo>();
+}
+
class TestMetricsService : public MetricsService {
public:
TestMetricsService(metrics::MetricsStateManager* state_manager,
@@ -62,7 +71,9 @@ class MetricsServiceTest : public testing::Test {
metrics_state_manager_ = metrics::MetricsStateManager::Create(
GetLocalState(),
base::Bind(&MetricsServiceTest::is_metrics_reporting_enabled,
- base::Unretained(this)));
+ base::Unretained(this)),
+ base::Bind(&StoreNoClientInfoBackup),
+ base::Bind(&ReturnNoBackup));
}
virtual ~MetricsServiceTest() {
« no previous file with comments | « components/metrics/client_info.cc ('k') | components/metrics/metrics_state_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698