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

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

Issue 19054012: Reload Local NTP on default search provider change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 7 years, 5 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/search/search.cc
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index 2e62b2d6846a9dbe4e3aa79466004933061c0e19..144501d2f97c59b68c34d277569fbb8dafa98fb7 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -348,15 +348,17 @@ GURL GetInstantURL(Profile* profile, int start_margin) {
}
GURL GetLocalInstantURL(Profile* profile) {
+ return GURL(chrome::kChromeSearchLocalNtpUrl);
+}
+
+bool DefaultSearchProviderIsGoogle(Profile* profile) {
+ DCHECK(profile);
samarth 2013/07/17 16:39:45 All the other functions in this file don't enforce
kmadhusu 2013/07/17 17:58:03 Done.
const TemplateURL* default_provider =
GetDefaultSearchProviderTemplateURL(profile);
- if (default_provider &&
+ return default_provider &&
(TemplateURLPrepopulateData::GetEngineType(default_provider->url()) ==
- SEARCH_ENGINE_GOOGLE)) {
- return GURL(chrome::kChromeSearchLocalGoogleNtpUrl);
- }
- return GURL(chrome::kChromeSearchLocalNtpUrl);
+ SEARCH_ENGINE_GOOGLE);
}
bool ShouldPreferRemoteNTPOnStartup() {

Powered by Google App Engine
This is Rietveld 408576698