| Index: components/enhanced_bookmarks/enhanced_bookmark_features.cc
|
| diff --git a/chrome/browser/bookmarks/enhanced_bookmarks_features.cc b/components/enhanced_bookmarks/enhanced_bookmark_features.cc
|
| similarity index 50%
|
| rename from chrome/browser/bookmarks/enhanced_bookmarks_features.cc
|
| rename to components/enhanced_bookmarks/enhanced_bookmark_features.cc
|
| index 4a33c1e07ad4a96d971cbb1bb13c3204bd7986cb..4ec0712320b0d1ea59bbba7571858bc494b131d6 100644
|
| --- a/chrome/browser/bookmarks/enhanced_bookmarks_features.cc
|
| +++ b/components/enhanced_bookmarks/enhanced_bookmark_features.cc
|
| @@ -1,30 +1,23 @@
|
| -// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Copyright 2015 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 "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
|
| +#include "components/enhanced_bookmarks/enhanced_bookmark_features.h"
|
|
|
| #include <string>
|
|
|
| #include "base/command_line.h"
|
| -#include "base/prefs/pref_service.h"
|
| -#include "build/build_config.h"
|
| -#include "chrome/common/chrome_switches.h"
|
| +#include "components/enhanced_bookmarks/enhanced_bookmark_switches.h"
|
| #include "components/variations/variations_associated_data.h"
|
|
|
| -namespace {
|
| +#if defined(OS_IOS) || defined(OS_ANDROID)
|
|
|
| +namespace enhanced_bookmarks {
|
| +namespace {
|
| const char kFieldTrialName[] = "EnhancedBookmarks";
|
| -
|
| } // namespace
|
|
|
| bool IsEnhancedBookmarksEnabled() {
|
| - // Enhanced bookmarks is not used on desktop, so it shouldn't be calling this
|
| - // function.
|
| -#if !defined(OS_IOS) && !defined(OS_ANDROID)
|
| - NOTREACHED();
|
| -#endif // !defined(OS_IOS) || !defined(OS_ANDROID)
|
| -
|
| // kEnhancedBookmarksExperiment flag could have values "", "1" and "0". "" -
|
| // default, "0" - user opted out, "1" - user opted in. Tests also use the
|
| // command line flag to force enhanced bookmark to be on.
|
| @@ -42,26 +35,6 @@ bool IsEnhancedBookmarksEnabled() {
|
| return !variations::GetVariationParamValue(kFieldTrialName, "id").empty();
|
| }
|
|
|
| -bool IsEnableDomDistillerSet() {
|
| - if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kEnableDomDistiller)) {
|
| - return true;
|
| - }
|
| - if (variations::GetVariationParamValue(kFieldTrialName,
|
| - "enable-dom-distiller") == "1")
|
| - return true;
|
| -
|
| - return false;
|
| -}
|
| -
|
| -bool IsEnableSyncArticlesSet() {
|
| - if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kEnableSyncArticles)) {
|
| - return true;
|
| - }
|
| - if (variations::GetVariationParamValue(kFieldTrialName,
|
| - "enable-sync-articles") == "1")
|
| - return true;
|
| +} // namespace enhanced_bookmarks
|
|
|
| - return false;
|
| -}
|
| +#endif
|
|
|