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

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

Issue 2869633003: [Sync] Hook UserEvents into sync. (Closed)
Patch Set: Rebase 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/user_event_service.cc
diff --git a/components/sync/user_events/user_event_service.cc b/components/sync/user_events/user_event_service.cc
index ac403790078bba75542117c3bd577af1205ebf6d..328808b6dcbfd6d8fa9ed6eaf4a231e102f2633b 100644
--- a/components/sync/user_events/user_event_service.cc
+++ b/components/sync/user_events/user_event_service.cc
@@ -7,8 +7,10 @@
#include <utility>
#include "base/bind.h"
+#include "base/feature_list.h"
#include "base/memory/ptr_util.h"
#include "base/rand_util.h"
+#include "components/sync/driver/sync_driver_switches.h"
#include "components/sync/driver/sync_service.h"
#include "components/sync/model/model_type_sync_bridge.h"
#include "components/sync/protocol/sync.pb.h"
@@ -51,7 +53,8 @@ bool UserEventService::CanRecordEvent(const UserEventSpecifics& specifics) {
// We only record events if the user is syncing history and has not enabled
// a custom passphrase. The type HISTORY_DELETE_DIRECTIVES is enabled in and
// only in this exact scenario.
- return sync_service_ != nullptr && sync_service_->IsEngineInitialized() &&
+ return base::FeatureList::IsEnabled(switches::kSyncUserEvents) &&
+ sync_service_ != nullptr && sync_service_->IsEngineInitialized() &&
sync_service_->GetPreferredDataTypes().Has(HISTORY_DELETE_DIRECTIVES);
}
« no previous file with comments | « components/sync/driver/sync_driver_switches.cc ('k') | components/sync/user_events/user_event_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698