Commit 7030dbf1 authored by Sky Malice's avatar Sky Malice Committed by Commit Bot

Reland of [Sync] Enable UserEvents by default.

Original CL https://codereview.chromium.org/2956333002/

Bug: 701032
Change-Id: I60e30a7acf9c3380710c4abbeddd87baabac3ce0
Reviewed-on: https://chromium-review.googlesource.com/565361Reviewed-by: default avatarPatrick Noland <pnoland@chromium.org>
Commit-Queue: Sky Malice <skym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485381}
parent fdacb19a
......@@ -78,6 +78,7 @@ class ProfileSyncServiceFactoryTest : public testing::Test {
datatypes.push_back(syncer::SUPERVISED_USER_SETTINGS);
datatypes.push_back(syncer::SUPERVISED_USER_WHITELISTS);
datatypes.push_back(syncer::TYPED_URLS);
datatypes.push_back(syncer::USER_EVENTS);
return datatypes;
}
......
......@@ -36,9 +36,10 @@ const char kSyncShortNudgeDelayForTest[] = "sync-short-nudge-delay-for-test";
const base::Feature kSyncClearDataOnPassphraseEncryption{
"ClearSyncDataOnPassphraseEncryption", base::FEATURE_DISABLED_BY_DEFAULT};
// Gates registration and construction of user events machinery.
// Gates registration and construction of user events machinery. Enabled by
// default as each use case should have their own gating feature as well.
const base::Feature kSyncUserEvents{"SyncUserEvents",
base::FEATURE_DISABLED_BY_DEFAULT};
base::FEATURE_ENABLED_BY_DEFAULT};
// Gates registration for user language detection events.
const base::Feature kSyncUserLanguageDetectionEvents{
......
......@@ -48,6 +48,7 @@ class IOSChromeProfileSyncServiceFactoryTest : public testing::Test {
datatypes.push_back(syncer::SESSIONS);
datatypes.push_back(syncer::PROXY_TABS);
datatypes.push_back(syncer::TYPED_URLS);
datatypes.push_back(syncer::USER_EVENTS);
return datatypes;
}
......
......@@ -38,6 +38,7 @@
#include "components/sync/engine/passive_model_worker.h"
#include "components/sync/engine/sequenced_model_worker.h"
#include "components/sync/engine/ui_model_worker.h"
#include "components/sync/user_events/user_event_service.h"
#include "components/sync_preferences/pref_service_syncable.h"
#include "components/sync_sessions/favicon_cache.h"
#include "components/sync_sessions/local_session_event_router.h"
......@@ -59,6 +60,7 @@
#include "ios/chrome/browser/signin/oauth2_token_service_factory.h"
#include "ios/chrome/browser/sync/glue/sync_start_util.h"
#include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h"
#include "ios/chrome/browser/sync/ios_user_event_service_factory.h"
#include "ios/chrome/browser/sync/sessions/ios_chrome_local_session_event_router.h"
#include "ios/chrome/browser/tabs/tab_model_synced_window_delegate_getter.h"
#include "ios/chrome/browser/undo/bookmark_undo_service_factory.h"
......@@ -364,6 +366,10 @@ IOSChromeSyncClient::GetSyncBridgeForModelType(syncer::ModelType type) {
// TODO(gangwu):implement TypedURLSyncBridge and return real
// TypedURLSyncBridge here.
return base::WeakPtr<syncer::ModelTypeSyncBridge>();
case syncer::USER_EVENTS:
return IOSUserEventServiceFactory::GetForBrowserState(browser_state_)
->GetSyncBridge()
->AsWeakPtr();
default:
NOTREACHED();
return base::WeakPtr<syncer::ModelTypeSyncBridge>();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment