Commit e79d9d0e authored by Greg Thompson's avatar Greg Thompson Committed by Commit Bot

Only detect outdated builds on Google Chrome.

Prior to https://crrev.com/643864, they weren't detected for Chromium on
account of the way google_brand worked. That CL changed behavior and
accidentally started showing the outdated build bubble for Linux
Chromium users.

BUG=1010592

Change-Id: I069ac36166e2ae720d58b1b9aa85605792be8684
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1841635Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703131}
parent 163f0f98
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "base/time/default_tick_clock.h" #include "base/time/default_tick_clock.h"
#include "base/time/tick_clock.h" #include "base/time/tick_clock.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "build/branding_buildflags.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/google/google_brand.h" #include "chrome/browser/google/google_brand.h"
#include "chrome/browser/obsolete_system/obsolete_system.h" #include "chrome/browser/obsolete_system/obsolete_system.h"
...@@ -74,6 +75,14 @@ constexpr base::TimeDelta kNotifyCycleTimeForTesting = ...@@ -74,6 +75,14 @@ constexpr base::TimeDelta kNotifyCycleTimeForTesting =
// The number of days after which we identify a build/install as outdated. // The number of days after which we identify a build/install as outdated.
constexpr base::TimeDelta kOutdatedBuildAge = base::TimeDelta::FromDays(12 * 7); constexpr base::TimeDelta kOutdatedBuildAge = base::TimeDelta::FromDays(12 * 7);
constexpr bool ShouldDetectOutdatedBuilds() {
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
return true;
#else // BUILDFLAG(GOOGLE_CHROME_BRANDING)
return false;
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
}
// Return the string that was passed as a value for the // Return the string that was passed as a value for the
// kCheckForUpdateIntervalSec switch. // kCheckForUpdateIntervalSec switch.
std::string CmdLineInterval() { std::string CmdLineInterval() {
...@@ -414,6 +423,9 @@ bool UpgradeDetectorImpl::DetectOutdatedInstall() { ...@@ -414,6 +423,9 @@ bool UpgradeDetectorImpl::DetectOutdatedInstall() {
return false; return false;
} }
#endif #endif
if (!ShouldDetectOutdatedBuilds())
return false;
} }
base::Time network_time; base::Time network_time;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment