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

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

Issue 228013002: Use whether a query is from the app list to determine the RLZ parameter. (Closed) Base URL: http://git.chromium.org/chromium/src.git@rlz-access-ids
Patch Set: Created 6 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/base_search_provider.h
diff --git a/chrome/browser/autocomplete/base_search_provider.h b/chrome/browser/autocomplete/base_search_provider.h
index 86eab7481c9113964990f5029f67194915455612..0ee06ae83e9da6ec2d6cd735ba43288744a1e4e6 100644
--- a/chrome/browser/autocomplete/base_search_provider.h
+++ b/chrome/browser/autocomplete/base_search_provider.h
@@ -73,6 +73,9 @@ class BaseSearchProvider : public AutocompleteProvider,
return field_trial_triggered_in_session_;
}
+ // Sets this as being in the app list.
Peter Kasting 2014/04/09 02:12:33 Nit: No need for a comment here as long as the one
Sam McNally 2014/04/09 05:33:44 Done.
+ void set_in_app_list() { in_app_list_ = true; }
+
protected:
// The following keys are used to record additional information on matches.
@@ -327,6 +330,7 @@ class BaseSearchProvider : public AutocompleteProvider,
// |append_extra_query_params| should be set if |template_url| is the default
// search engine, so the destination URL will contain any
// command-line-specified query params.
+ // |from_app_list| should be set if the search was made from the app list.
static AutocompleteMatch CreateSearchSuggestion(
AutocompleteProvider* autocomplete_provider,
const AutocompleteInput& input,
@@ -334,7 +338,8 @@ class BaseSearchProvider : public AutocompleteProvider,
const TemplateURL* template_url,
int accepted_suggestion,
int omnibox_start_margin,
- bool append_extra_query_params);
+ bool append_extra_query_params,
+ bool from_app_list);
// Parses JSON response received from the provider, stripping XSSI
// protection if needed. Returns the parsed data if successful, NULL
@@ -480,6 +485,9 @@ class BaseSearchProvider : public AutocompleteProvider,
// causes us to auto-cancel all such requests on shutdown.
SuggestionDeletionHandlers deletion_handlers_;
+ // True if this is in the app list. Otherwise, this is in the omnibox.
Peter Kasting 2014/04/09 02:12:33 Nit: Maybe: True if this provider's results are b
Sam McNally 2014/04/09 05:33:44 Done.
+ bool in_app_list_;
+
DISALLOW_COPY_AND_ASSIGN(BaseSearchProvider);
};

Powered by Google App Engine
This is Rietveld 408576698