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

Unified Diff: chrome/browser/search/instant_service.cc

Issue 930853005: [Instant] Default Search Provider change redirects to local NTP in some cases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: includes Created 5 years, 10 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/android/tab_android.cc ('k') | chrome/browser/search/instant_service_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/instant_service.cc
diff --git a/chrome/browser/search/instant_service.cc b/chrome/browser/search/instant_service.cc
index 79f4237aea3c77627162cfdc58e7c2691a3e294e..f02d6561ea173138e6a4e1e400201f291b66d8ec 100644
--- a/chrome/browser/search/instant_service.cc
+++ b/chrome/browser/search/instant_service.cc
@@ -407,18 +407,20 @@ void InstantService::OnTemplateURLServiceChanged() {
// changed, the effective URLs might change if they reference the Google base
// URL. The TemplateURLService will notify us when the effective URL changes
// in this way but it's up to us to do the work to check both.
+ bool google_base_url_domain_changed = false;
GURL google_base_url(UIThreadSearchTermsData(profile_).GoogleBaseURLValue());
if (google_base_url != previous_google_base_url_) {
previous_google_base_url_ = google_base_url;
if (template_url && template_url->HasGoogleBaseURLs(
UIThreadSearchTermsData(profile_)))
- default_search_provider_changed = true;
+ google_base_url_domain_changed = true;
}
- if (default_search_provider_changed) {
+ if (default_search_provider_changed || google_base_url_domain_changed) {
ResetInstantSearchPrerenderer();
- FOR_EACH_OBSERVER(InstantServiceObserver, observers_,
- DefaultSearchProviderChanged());
+ FOR_EACH_OBSERVER(
+ InstantServiceObserver, observers_,
+ DefaultSearchProviderChanged(google_base_url_domain_changed));
}
}
« no previous file with comments | « chrome/browser/android/tab_android.cc ('k') | chrome/browser/search/instant_service_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698