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

Unified Diff: components/sync/user_events/no_op_user_event_service.cc

Issue 2909283003: [Sync] Split UserEventService into interface and impl, add fake impl, add unit tests. (Closed)
Patch Set: Added a NoOp service to handle OffTheRecord. Created 3 years, 7 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
Index: components/sync/user_events/no_op_user_event_service.cc
diff --git a/components/sync/user_events/no_op_user_event_service.cc b/components/sync/user_events/no_op_user_event_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..cb259cb74b9ef16a318af295a2ede90a878a1546
--- /dev/null
+++ b/components/sync/user_events/no_op_user_event_service.cc
@@ -0,0 +1,31 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/sync/user_events/no_op_user_event_service.h"
+
+#include "base/memory/weak_ptr.h"
+
+using sync_pb::UserEventSpecifics;
+
+namespace syncer {
+
+NoOpUserEventService::NoOpUserEventService() {}
+
+NoOpUserEventService::~NoOpUserEventService() {}
+
+void NoOpUserEventService::RecordUserEvent(
+ std::unique_ptr<UserEventSpecifics> specifics) {}
+
+void NoOpUserEventService::RecordUserEvent(
+ const UserEventSpecifics& specifics) {}
+
+base::WeakPtr<ModelTypeSyncBridge> NoOpUserEventService::GetSyncBridge() {
+ return base::WeakPtr<ModelTypeSyncBridge>();
+}
+
+void NoOpUserEventService::RegisterDependentFieldTrial(
+ const std::string& trial_name,
+ UserEventSpecifics::EventCase event_case) {}
+
+} // namespace syncer
« no previous file with comments | « components/sync/user_events/no_op_user_event_service.h ('k') | components/sync/user_events/user_event_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698