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

Unified Diff: chrome/browser/search_engines/template_url_model.cc

Issue 3171019: Reland r56483 - Monitor network change in GoogleURLTracker (Closed)
Patch Set: check Chrome Frame Created 10 years, 4 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
« no previous file with comments | « chrome/browser/google_url_tracker_unittest.cc ('k') | chrome/common/net/test_url_fetcher_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search_engines/template_url_model.cc
diff --git a/chrome/browser/search_engines/template_url_model.cc b/chrome/browser/search_engines/template_url_model.cc
index d77722545a753cec2ea1d0540e1d5030a702dee1..d66f5737d71cdf87ac4410a007b539d6c83de82a 100644
--- a/chrome/browser/search_engines/template_url_model.cc
+++ b/chrome/browser/search_engines/template_url_model.cc
@@ -5,6 +5,8 @@
#include "chrome/browser/search_engines/template_url_model.h"
#include "app/l10n_util.h"
+#include "base/command_line.h"
+#include "base/environment.h"
#include "base/stl_util-inl.h"
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
@@ -17,6 +19,8 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/rlz/rlz.h"
#include "chrome/browser/search_engines/template_url_prepopulate_data.h"
+#include "chrome/common/chrome_switches.h"
+#include "chrome/common/env_vars.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
@@ -126,9 +130,11 @@ void TemplateURLModel::Init(const Initializer* initializers,
}
// Request a server check for the correct Google URL if Google is the default
- // search engine.
+ // search engine, not in headless mode and not in Chrome Frame.
const TemplateURL* default_provider = GetDefaultSearchProvider();
- if (default_provider) {
+ scoped_ptr<base::Environment> env(base::Environment::Create());
+ if (default_provider && !env->HasVar(env_vars::kHeadless) &&
+ !CommandLine::ForCurrentProcess()->HasSwitch(switches::kCrhomeFrame)) {
const TemplateURLRef* default_provider_ref = default_provider->url();
if (default_provider_ref && default_provider_ref->HasGoogleBaseURLs())
GoogleURLTracker::RequestServerCheck();
« no previous file with comments | « chrome/browser/google_url_tracker_unittest.cc ('k') | chrome/common/net/test_url_fetcher_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698