blob: 49abd9485b49678eca724aaaeb2175635ed34cd3 [file] [log] [blame]
// Copyright 2019 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/send_tab_to_self/features.h"
#include "components/sync/base/sync_prefs.h"
#include "components/sync/base/user_selectable_type.h"
namespace send_tab_to_self {
const base::Feature kSendTabToSelfShowSendingUI{
"SendTabToSelfShowSendingUI", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kSendTabToSelfBroadcast{"SendTabToSelfBroadcast",
base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kSendTabToSelfWhenSignedIn{
"SendTabToSelfWhenSignedIn", base::FEATURE_DISABLED_BY_DEFAULT};
bool IsReceivingEnabledByUserOnThisDevice(PrefService* prefs) {
syncer::SyncPrefs sync_prefs(prefs);
return sync_prefs.GetSelectedTypes().Has(syncer::UserSelectableType::kTabs);
}
bool EnabledOnSignIn() {
return base::FeatureList::IsEnabled(kSendTabToSelfWhenSignedIn);
}
} // namespace send_tab_to_self