// Chrome's been upgraded behind our back.
const int kCheckForUpgradeMs = 2 * 60 * 60 * 1000; // 2 hours.
// be at. Once we reach the highest severity, the timer will stop.
const int kNotifyCycleTimeMs = 20 * 60 * 1000; // 20 minutes.
// Same as kNotifyCycleTimeMs but only used during testing.
const int kNotifyCycleTimeForTestingMs = 500; // Half a second.
// The number of days after which we identify a build/install as outdated.
// Check if any of the testing switches was present on the command line.
// How often to check for an upgrade.
// Check for a value passed via the command line.
return interval_ms * 1000; // Command line value is in seconds.
// Return true if the current build is one of the unstable channels.
// but no anymore. But other platform may still need the file thread.
// unconditionally calls back the provided task.
// Return true if the currently running Chrome is a system install.
// upgraded in the background.
// thread to continue processing.
// Don't try to turn on autoupdate when we failed previously.
// NULL, also retrieves the critical update version info if available.
// POSIX but not Mac OS X: Linux, etc.
// switch from being taken into account.
// - kSimulateUpgrade supersedes critical or outdated upgrade switches.
// - kSimulateCriticalUpdate has precedence over kSimulateOutdated.
// - kSimulateOutdatedNoAU has precedence over kSimulateOutdated.
// - kSimulateOutdated[NoAu] can work on its own, or with a specified date.
// overrides the build date.
// tracking moves off of the VariationsService, the "variations-server-url"
// available on non GOOGLE_CHROME_BUILD.
// We got a valid build date simulation so use it and check for upgrades.
// since it outlives the VariationsService.
// enable it in the past.
// Only enable upgrade notifications if the updater (Keystone) is present.
// Always enable upgrade notifications regardless of branding.
// Check whether the build is an unstable channel before starting the timer.
// be interrupted from the UI thread.
// Get the version of the currently *running* instance of Chrome.
// a critical update, such as a zero-day fix.
// Fire off the upgrade detected task.
// experiment updates being available).
// Start the repeating timer for notifying the user after a certain period.
// and stop the timer.
const int cycle_time_ms = IsTesting() ?
// an outdated build is being simulated by command line switches.
// Don't show the update bubbles to enterprise users (i.e., on a domain).
// machine doesn't support SSE2, it's been deprecated starting with M35.
// checking for version upgrades, which happens on non-official builds.
// Stop the recurring timer (that is checking for changes).
const base::TimeDelta unstable_threshold = IsTesting() ?
// That's as high as it goes.
return; // Not ready to recommend upgrade.
const base::TimeDelta multiplier = IsTesting() ?
// 14 days when not testing, otherwise 140 seconds.
// These if statements must be sorted (highest interval first).
// We can't get any higher, baby.