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

Side by Side Diff: chrome/browser/autocomplete/search_provider.h

Issue 115885: Hoist TrimHttpPrefix() so we only have one copy, not one per provider.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // This file contains the Search autocomplete provider. This provider is 5 // This file contains the Search autocomplete provider. This provider is
6 // responsible for all non-keyword autocomplete entries that start with 6 // responsible for all non-keyword autocomplete entries that start with
7 // "Search <engine> for ...", including searching for the current input string, 7 // "Search <engine> for ...", including searching for the current input string,
8 // search history, and search suggestions. An instance of it gets created and 8 // search history, and search suggestions. An instance of it gets created and
9 // managed by the autocomplete controller. 9 // managed by the autocomplete controller.
10 // 10 //
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 int relevance, 253 int relevance,
254 AutocompleteMatch::Type type, 254 AutocompleteMatch::Type type,
255 int accepted_suggestion, 255 int accepted_suggestion,
256 bool is_keyword, 256 bool is_keyword,
257 MatchMap* map); 257 MatchMap* map);
258 // Returns an AutocompleteMatch for a navigational suggestion. 258 // Returns an AutocompleteMatch for a navigational suggestion.
259 AutocompleteMatch NavigationToMatch(const NavigationResult& query_string, 259 AutocompleteMatch NavigationToMatch(const NavigationResult& query_string,
260 int relevance, 260 int relevance,
261 bool is_keyword); 261 bool is_keyword);
262 262
263 // Trims "http:" and up to two subsequent slashes from |url|. Returns the
264 // number of characters that were trimmed.
265 // TODO(kochi): this is duplicate from history_autocomplete
266 static size_t TrimHttpPrefix(std::wstring* url);
267
268 // Should we query for suggest results immediately? This is normally false, 263 // Should we query for suggest results immediately? This is normally false,
269 // but may be set to true during testing. 264 // but may be set to true during testing.
270 static bool query_suggest_immediately_; 265 static bool query_suggest_immediately_;
271 266
272 // Maintains the TemplateURLs used. 267 // Maintains the TemplateURLs used.
273 Providers providers_; 268 Providers providers_;
274 269
275 // The user's input. 270 // The user's input.
276 AutocompleteInput input_; 271 AutocompleteInput input_;
277 272
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 NavigationResults keyword_navigation_results_; 314 NavigationResults keyword_navigation_results_;
320 NavigationResults default_navigation_results_; 315 NavigationResults default_navigation_results_;
321 316
322 // Whether suggest_results_ is valid. 317 // Whether suggest_results_ is valid.
323 bool have_suggest_results_; 318 bool have_suggest_results_;
324 319
325 DISALLOW_EVIL_CONSTRUCTORS(SearchProvider); 320 DISALLOW_EVIL_CONSTRUCTORS(SearchProvider);
326 }; 321 };
327 322
328 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ 323 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/history_url_provider.cc ('k') | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698