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

Unified Diff: components/dom_distiller/core/dom_distiller_features.cc

Issue 1253953002: Componentize enhanced_bookmark_features.{h,cc}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert change in //chrome/common/DEPS that broke checkdeps Created 5 years, 5 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/dom_distiller/core/dom_distiller_features.cc
diff --git a/components/dom_distiller/core/dom_distiller_features.cc b/components/dom_distiller/core/dom_distiller_features.cc
new file mode 100644
index 0000000000000000000000000000000000000000..af5464c8d16f58b4820fa3d73c30b43e5d38f83d
--- /dev/null
+++ b/components/dom_distiller/core/dom_distiller_features.cc
@@ -0,0 +1,42 @@
+// 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 "components/dom_distiller/core/dom_distiller_features.h"
+
+#include <string>
+
+#include "base/command_line.h"
+#include "components/dom_distiller/core/dom_distiller_switches.h"
+#include "components/variations/variations_associated_data.h"
+
+namespace dom_distiller {
+namespace {
+const char kFieldTrialName[] = "EnhancedBookmarks";
+}
+
+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;
+ }
+ return false;
+}
+
+} // namespace dom_distiller
« no previous file with comments | « components/dom_distiller/core/dom_distiller_features.h ('k') | components/dom_distiller/core/dom_distiller_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698