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

Unified Diff: components/reading_list/reading_list_switches.cc

Issue 2514333003: Componentize Reading List (Closed)
Patch Set: fix Created 4 years, 1 month 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/reading_list/reading_list_switches.cc
diff --git a/components/reading_list/reading_list_switches.cc b/components/reading_list/reading_list_switches.cc
new file mode 100644
index 0000000000000000000000000000000000000000..50a81d96973daa7f24c881d9128e1eba4d0637d9
--- /dev/null
+++ b/components/reading_list/reading_list_switches.cc
@@ -0,0 +1,24 @@
+// Copyright 2016 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/reading_list/reading_list_switches.h"
+
+#include "base/command_line.h"
+
+namespace reading_list {
+namespace switches {
+// Enables the reading list.
+const char kEnableReadingList[] = "enable-reading-list";
+
+// Disables the reading list.
+const char kDisableReadingList[] = "disable-reading-list";
+
+bool IsReadingListEnabled() {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableReadingList)) {
+ return true;
+ }
+ return false;
+}
+}
sdefresne 2016/11/21 14:48:31 } // namespace switches } // namespace reading_l
Olivier 2016/11/21 15:46:40 Done.
+}

Powered by Google App Engine
This is Rietveld 408576698