Commit 2543cc57 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Remove launched feature SyncUserEvents

Bug: 934333
Change-Id: If517ddf3da2e3a47f07cda70a13e4b68e4b3d11f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1556800
Commit-Queue: Marc Treib <treib@chromium.org>
Auto-Submit: Marc Treib <treib@chromium.org>
Reviewed-by: default avatarvitaliii <vitaliii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#648674}
parent 99f09b6d
......@@ -9,7 +9,6 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/profiles/profile.h"
......@@ -263,9 +262,10 @@ void SyncInternalsMessageHandler::HandleRequestUserEventsVisibility(
const base::ListValue* args) {
DCHECK(args->empty());
AllowJavascript();
CallJavascriptFunction(
syncer::sync_ui_util::kUserEventsVisibilityCallback,
Value(base::FeatureList::IsEnabled(switches::kSyncUserEvents)));
// TODO(crbug.com/934333): Get rid of this callback now that user events are
// always enabled.
CallJavascriptFunction(syncer::sync_ui_util::kUserEventsVisibilityCallback,
Value(true));
}
void SyncInternalsMessageHandler::HandleSetIncludeSpecifics(
......
......@@ -396,8 +396,7 @@ ProfileSyncComponentsFactoryImpl::CreateCommonDataTypeControllers(
syncer::READING_LIST));
}
if (!disabled_types.Has(syncer::USER_EVENTS) &&
FeatureList::IsEnabled(switches::kSyncUserEvents)) {
if (!disabled_types.Has(syncer::USER_EVENTS)) {
controllers.push_back(CreateModelTypeControllerForModelRunningOnUIThread(
syncer::USER_EVENTS));
}
......
......@@ -92,11 +92,6 @@ const base::Feature kSyncSendTabToSelf{"SyncSendTabToSelf",
const base::Feature kSyncSupportSecondaryAccount{
"SyncSupportSecondaryAccount", base::FEATURE_DISABLED_BY_DEFAULT};
// 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_ENABLED_BY_DEFAULT};
// Gates registration for user language detection events.
const base::Feature kSyncUserLanguageDetectionEvents{
"SyncUserLanguageDetectionEvents", base::FEATURE_DISABLED_BY_DEFAULT};
......
......@@ -44,7 +44,6 @@ extern const base::Feature kSyncPseudoUSSSupervisedUsers;
extern const base::Feature kSyncPseudoUSSThemes;
extern const base::Feature kSyncSendTabToSelf;
extern const base::Feature kSyncSupportSecondaryAccount;
extern const base::Feature kSyncUserEvents;
extern const base::Feature kSyncUserLanguageDetectionEvents;
extern const base::Feature kSyncUserTranslationEvents;
extern const base::Feature kSyncUSSBookmarks;
......
......@@ -6,7 +6,6 @@
#include <utility>
#include "base/feature_list.h"
#include "base/rand_util.h"
#include "base/stl_util.h"
#include "base/time/time.h"
......@@ -96,8 +95,7 @@ ModelTypeSyncBridge* UserEventServiceImpl::GetSyncBridge() {
// static
bool UserEventServiceImpl::MightRecordEvents(bool off_the_record,
SyncService* sync_service) {
return !off_the_record && sync_service &&
base::FeatureList::IsEnabled(switches::kSyncUserEvents);
return !off_the_record && sync_service;
}
bool UserEventServiceImpl::CanRecordHistory() {
......
......@@ -7,7 +7,6 @@
#include <utility>
#include <vector>
#include "base/test/scoped_feature_list.h"
#include "base/test/scoped_task_environment.h"
#include "components/sync/base/model_type.h"
#include "components/sync/driver/sync_driver_switches.h"
......@@ -19,7 +18,6 @@
#include "components/variations/variations_associated_data.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::test::ScopedFeatureList;
using sync_pb::UserEventSpecifics;
using testing::_;
......@@ -86,11 +84,9 @@ class UserEventServiceImplTest : public testing::Test {
syncer::TestSyncService sync_service_;
testing::NiceMock<MockModelTypeChangeProcessor> mock_processor_;
TestGlobalIdMapper mapper_;
base::test::ScopedFeatureList feature_list_;
};
TEST_F(UserEventServiceImplTest, MightRecordEventsFeatureEnabled) {
TEST_F(UserEventServiceImplTest, MightRecordEvents) {
// All conditions are met, might record.
EXPECT_TRUE(UserEventServiceImpl::MightRecordEvents(false, sync_service()));
// No sync service, will not record.
......@@ -99,13 +95,6 @@ TEST_F(UserEventServiceImplTest, MightRecordEventsFeatureEnabled) {
EXPECT_FALSE(UserEventServiceImpl::MightRecordEvents(true, sync_service()));
}
TEST_F(UserEventServiceImplTest, MightRecordEventsFeatureDisabled) {
// Will not record because the default on feature is overridden.
ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitAndDisableFeature(switches::kSyncUserEvents);
EXPECT_FALSE(UserEventServiceImpl::MightRecordEvents(false, sync_service()));
}
TEST_F(UserEventServiceImplTest, ShouldRecord) {
UserEventServiceImpl service(sync_service(), MakeBridge());
EXPECT_CALL(*mock_processor(), Put(_, _, _));
......
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