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

Unified Diff: chrome/browser/google/google_url_tracker.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/google/google_url_tracker.cc
===================================================================
--- chrome/browser/google/google_url_tracker.cc (revision 58650)
+++ chrome/browser/google/google_url_tracker.cc (working copy)
@@ -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 @@
!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;
+
already_fetched_ = true;
fetcher_.reset(URLFetcher::Create(fetcher_id_, GURL(kSearchDomainCheckURL),
URLFetcher::GET, this));

Powered by Google App Engine
This is Rietveld 408576698