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

Side by Side Diff: chrome/browser/search/search.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/search/local_ntp_source.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SEARCH_SEARCH_H_ 5 #ifndef CHROME_BROWSER_SEARCH_SEARCH_H_
6 #define CHROME_BROWSER_SEARCH_SEARCH_H_ 6 #define CHROME_BROWSER_SEARCH_SEARCH_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // if the engine doesn't have an Instant URL, or if it shouldn't be used (say 90 // if the engine doesn't have an Instant URL, or if it shouldn't be used (say
91 // because it doesn't satisfy the requirements for extended mode or if Instant 91 // because it doesn't satisfy the requirements for extended mode or if Instant
92 // is disabled through preferences). Callers must check that the returned URL is 92 // is disabled through preferences). Callers must check that the returned URL is
93 // valid before using it. The value of |start_margin| is used for the "es_sm" 93 // valid before using it. The value of |start_margin| is used for the "es_sm"
94 // parameter in the URL. 94 // parameter in the URL.
95 // NOTE: This method expands the default search engine's instant_url template, 95 // NOTE: This method expands the default search engine's instant_url template,
96 // so it shouldn't be called from SearchTermsData or other such code that would 96 // so it shouldn't be called from SearchTermsData or other such code that would
97 // lead to an infinite recursion. 97 // lead to an infinite recursion.
98 GURL GetInstantURL(Profile* profile, int start_margin); 98 GURL GetInstantURL(Profile* profile, int start_margin);
99 99
100 // Returns the Local Instant URL of the default search engine. In particular, 100 // Returns the Local Instant URL of the New Tab Page.
101 // a Google search provider will include a special query parameter, indicating 101 // TODO(kmadhusu): Remove this function and update the call sites.
102 // to the JS that Google-specific New Tab Page elements should be rendered.
103 GURL GetLocalInstantURL(Profile* profile); 102 GURL GetLocalInstantURL(Profile* profile);
104 103
105 // Returns true if 'use_remote_ntp_on_startup' flag is enabled in field trials 104 // Returns true if 'use_remote_ntp_on_startup' flag is enabled in field trials
106 // to always show the remote NTP on browser startup. 105 // to always show the remote NTP on browser startup.
107 bool ShouldPreferRemoteNTPOnStartup(); 106 bool ShouldPreferRemoteNTPOnStartup();
108 107
109 // Returns true if the Instant NTP should be preloaded before it is shown. 108 // Returns true if the Instant NTP should be preloaded before it is shown.
110 bool ShouldPreloadInstantNTP(Profile* profile); 109 bool ShouldPreloadInstantNTP(Profile* profile);
111 110
112 // Returns true if the Instant NTP should be shown and false if not. 111 // Returns true if the Instant NTP should be shown and false if not.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 bool default_value, 187 bool default_value,
189 const FieldTrialFlags& flags); 188 const FieldTrialFlags& flags);
190 189
191 // Let tests reset the gate that prevents metrics from being sent more than 190 // Let tests reset the gate that prevents metrics from being sent more than
192 // once. 191 // once.
193 void ResetInstantExtendedOptInStateGateForTest(); 192 void ResetInstantExtendedOptInStateGateForTest();
194 193
195 } // namespace chrome 194 } // namespace chrome
196 195
197 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ 196 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_
OLDNEW
« no previous file with comments | « chrome/browser/search/local_ntp_source.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698