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

Unified Diff: components/memory_coordinator/common/memory_coordinator_features.cc

Issue 2094583002: Add MemoryCoordinator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use feature_list Created 4 years, 6 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/memory_coordinator/common/memory_coordinator_features.cc
diff --git a/components/memory_coordinator/common/memory_coordinator_features.cc b/components/memory_coordinator/common/memory_coordinator_features.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3e62c4c13db365659b5c9486e961a242c9ff9e6b
--- /dev/null
+++ b/components/memory_coordinator/common/memory_coordinator_features.cc
@@ -0,0 +1,24 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
haraken 2016/06/27 11:16:00 2016
bashi 2016/06/27 22:40:23 Acknowledged.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/feature_list.h"
+
+namespace memory_coordinator {
+
+const base::Feature kMemoryCoordinator {
+ "MemoryCoordinator", base::FEATURE_DISABLED_BY_DEFAULT
+};
+
+bool IsEnabled() {
+ return base::FeatureList::IsEnabled(kMemoryCoordinator);
+}
+
+void EnableForTesting() {
+ base::FeatureList::ClearInstanceForTesting();
+ std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
+ feature_list->InitializeFromCommandLine(kMemoryCoordinator.name, "");
+ base::FeatureList::SetInstance(std::move(feature_list));
+}
+
+} // namespace memory_coordinator

Powered by Google App Engine
This is Rietveld 408576698