summaryrefslogtreecommitdiffstats
path: root/chrome/browser/google
diff options
context:
space:
mode:
authormbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-08 23:21:18 +0000
committermbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-08 23:21:18 +0000
commit6142debab3eab9d0007ef32ed13a24a585a86b45 (patch)
tree0fed4d6d40a6114e055397b0cbc883dd52c14fe4 /chrome/browser/google
parent89b07797e8690a642eabbb15238417ed72dc928a (diff)
downloadchromium_src-6142debab3eab9d0007ef32ed13a24a585a86b45.zip
chromium_src-6142debab3eab9d0007ef32ed13a24a585a86b45.tar.gz
chromium_src-6142debab3eab9d0007ef32ed13a24a585a86b45.tar.bz2
Add a command line switch "--disable-background-networking", to be used in
benchmarking when unexpected background networking can cause undesired vairance. The following systems are disabled via this flag: - IntranetRedirectDetector (requests randomURLs 2-5s after startup) - GoogleUrlTracker (searchdomaincheck) - SafeBrowsing updater - Extension updater BUG=none TEST=none Review URL: http://codereview.chromium.org/3312014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58892 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/google')
-rw-r--r--chrome/browser/google/google_url_tracker.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/google/google_url_tracker.cc b/chrome/browser/google/google_url_tracker.cc
index 606cc27..30956b6 100644
--- a/chrome/browser/google/google_url_tracker.cc
+++ b/chrome/browser/google/google_url_tracker.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "app/l10n_util.h"
+#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
@@ -17,6 +18,7 @@
#include "chrome/browser/tab_contents/infobar_delegate.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/net/url_fetcher_protect.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
@@ -188,6 +190,10 @@ void GoogleURLTracker::StartFetchIfDesirable() {
!request_context_available_)
return;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableBackgroundNetworking))
+ return;
+
already_fetched_ = true;
fetcher_.reset(URLFetcher::Create(fetcher_id_, GURL(kSearchDomainCheckURL),
URLFetcher::GET, this));