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

Unified Diff: chrome/browser/autocomplete/search_provider.h

Issue 10033017: More misc. cleanups to minimize future refactoring diffs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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/autocomplete/search_provider.h
===================================================================
--- chrome/browser/autocomplete/search_provider.h (revision 131375)
+++ chrome/browser/autocomplete/search_provider.h (working copy)
@@ -119,7 +119,17 @@
return cached_keyword_provider_;
}
- // Returns true of the keyword provider is valid.
+ // Returns true if the default provider is valid.
+ bool valid_default_provider() const { return !!default_provider_; }
sky 2012/04/10 16:16:22 nit: !! is obscure.
Peter Kasting 2012/04/10 17:53:44 It is, but I'm just moving this code up from below
+
+ // Returns true if the default provider is valid and has a valid suggest
+ // url.
+ bool valid_suggest_for_default_provider() const {
+ return default_provider_ &&
+ !cached_default_provider_.suggestions_url().empty();
+ }
+
+ // Returns true if the keyword provider is valid.
bool valid_keyword_provider() const { return !!keyword_provider_; }
// Returns true if the keyword provider is valid and has a valid suggest
@@ -129,16 +139,6 @@
!cached_keyword_provider_.suggestions_url().empty();
}
- // Returns true of the default provider is valid.
- bool valid_default_provider() const { return !!default_provider_; }
-
- // Returns true if the default provider is valid and has a valid suggest
- // url.
- bool valid_suggest_for_default_provider() const {
- return default_provider_ &&
- !cached_default_provider_.suggestions_url().empty();
- }
-
// Returns true if |from_keyword_provider| is true, or
// the keyword provider is not valid.
bool is_primary_provider(bool from_keyword_provider) const {
@@ -202,10 +202,11 @@
void StopSuggest();
// Creates a URLFetcher requesting suggest results from the specified
- // |provider|. The caller owns the returned URLFetcher.
- content::URLFetcher* CreateSuggestFetcher(int id,
- const TemplateURL& provider,
- const string16& text);
+ // |suggestions_url|. The caller owns the returned URLFetcher.
+ content::URLFetcher* CreateSuggestFetcher(
+ int id,
+ const TemplateURLRef& suggestions_url,
+ const string16& text);
// Parses the results from the Suggest server and stores up to kMaxMatches of
// them in server_results_. Returns whether parsing succeeded.

Powered by Google App Engine
This is Rietveld 408576698