From 95879ad33828c616347f2b063fe37aed08d8bad2 Mon Sep 17 00:00:00 2001 From: "mbelshe@chromium.org" Date: Wed, 6 Apr 2011 21:22:40 +0000 Subject: Add the UpgradeDetector to the list of things which don't run when the --disable-background-networking cmdline switch is set. BUG=none TEST=none Review URL: http://codereview.chromium.org/6802018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80696 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/upgrade_detector.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'chrome/browser/upgrade_detector.cc') diff --git a/chrome/browser/upgrade_detector.cc b/chrome/browser/upgrade_detector.cc index b503e89..8d8d60d 100644 --- a/chrome/browser/upgrade_detector.cc +++ b/chrome/browser/upgrade_detector.cc @@ -149,6 +149,9 @@ void UpgradeDetector::RegisterPrefs(PrefService* prefs) { UpgradeDetector::UpgradeDetector() : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), notify_upgrade_(false) { + CommandLine command_line(*CommandLine::ForCurrentProcess()); + if (command_line.HasSwitch(switches::kDisableBackgroundNetworking)) + return; // Windows: only enable upgrade notifications for official builds. // Mac: only enable them if the updater (Keystone) is present. // Linux (and other POSIX): always enable regardless of branding. -- cgit v1.1