summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-02-01 12:21:33 -0800
committerLei Zhang <thestig@chromium.org>2016-02-01 20:23:38 +0000
commit2287563882e7babae51bf4bc9a3322a85afb71d5 (patch)
tree407c92e2d31e8a7e929be457e22f2593e6bafaef
parent4c95200049e3ac2b61c79b2bb7879c03e0db84ae (diff)
downloadchromium_src-2287563882e7babae51bf4bc9a3322a85afb71d5.zip
chromium_src-2287563882e7babae51bf4bc9a3322a85afb71d5.tar.gz
chromium_src-2287563882e7babae51bf4bc9a3322a85afb71d5.tar.bz2
Linux: Control deprecation message with a Finch experiment.
BUG=582208 Review URL: https://codereview.chromium.org/1650443002 Cr-Commit-Position: refs/heads/master@{#372445} (cherry picked from commit 146163bbe82315d2a12752f2b3db7a804b771a02) Review URL: https://codereview.chromium.org/1651223002 . Cr-Commit-Position: refs/branch-heads/2623@{#219} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
-rw-r--r--chrome/browser/obsolete_system/obsolete_system_linux.cc7
-rw-r--r--chrome/common/chrome_features.cc8
-rw-r--r--chrome/common/chrome_features.h4
3 files changed, 19 insertions, 0 deletions
diff --git a/chrome/browser/obsolete_system/obsolete_system_linux.cc b/chrome/browser/obsolete_system/obsolete_system_linux.cc
index 48863f3..80ba5c6 100644
--- a/chrome/browser/obsolete_system/obsolete_system_linux.cc
+++ b/chrome/browser/obsolete_system/obsolete_system_linux.cc
@@ -11,8 +11,10 @@
#if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS)
#include <gnu/libc-version.h>
+#include "base/feature_list.h"
#include "base/sys_info.h"
#include "base/version.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/chromium_strings.h"
#include "ui/base/l10n/l10n_util.h"
@@ -67,7 +69,12 @@ base::string16 ObsoleteSystem::LocalizedObsoleteString() {
// static
bool ObsoleteSystem::IsEndOfTheLine() {
+#if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS)
+ return base::FeatureList::IsEnabled(
+ features::kLinuxObsoleteSystemIsEndOfTheLine);
+#else
return false;
+#endif
}
// static
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
index fe1c1ae..b571587 100644
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -14,4 +14,12 @@ const base::Feature kAutomaticTabDiscarding{"AutomaticTabDiscarding",
base::FEATURE_DISABLED_BY_DEFAULT};
#endif // defined(OS_WIN) || defined(OS_MACOSX)
+#if defined(GOOGLE_CHROME_BUILD) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
+// Enables showing the "This computer will no longer receive Google Chrome
+// updates" infobar instead of the "will soon stop receiving" infobar on
+// deprecated systems.
+const base::Feature kLinuxObsoleteSystemIsEndOfTheLine{
+ "LinuxObsoleteSystemIsEndOfTheLine", base::FEATURE_DISABLED_BY_DEFAULT};
+#endif
+
} // namespace features
diff --git a/chrome/common/chrome_features.h b/chrome/common/chrome_features.h
index 1d3a72c..f1fc0b7 100644
--- a/chrome/common/chrome_features.h
+++ b/chrome/common/chrome_features.h
@@ -19,6 +19,10 @@ namespace features {
extern const base::Feature kAutomaticTabDiscarding;
#endif // defined(OS_WIN) || defined(OS_MACOSX)
+#if defined(GOOGLE_CHROME_BUILD) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
+extern const base::Feature kLinuxObsoleteSystemIsEndOfTheLine;
+#endif
+
// DON'T ADD RANDOM STUFF HERE. Put it in the main section above in
// alphabetical order, or in one of the ifdefs (also in order in each section).