Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1625)

Unified Diff: chrome/browser/intranet_redirect_detector.cc

Issue 3312014: Add a command line switch "--disable-background-networking", to be used in... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/intranet_redirect_detector.cc
===================================================================
--- chrome/browser/intranet_redirect_detector.cc (revision 58650)
+++ chrome/browser/intranet_redirect_detector.cc (working copy)
@@ -4,12 +4,14 @@
#include "chrome/browser/intranet_redirect_detector.h"
+#include "base/command_line.h"
#include "base/rand_util.h"
#include "base/stl_util-inl.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profile.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
#include "net/base/load_flags.h"
@@ -78,6 +80,10 @@
if (in_sleep_ || !request_context_available_)
return;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
Peter Kasting 2010/09/08 19:38:45 Nit: I'd put this at the end of the above conditio
+ switches::kDisableBackgroundNetworking))
+ return;
+
DCHECK(fetchers_.empty() && resulting_origins_.empty());
// Start three fetchers on random hostnames.

Powered by Google App Engine
This is Rietveld 408576698