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

Side by Side Diff: chrome/browser/ui/app_list/search/omnibox_provider.cc

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 unified diff | Download patch
« no previous file with comments | « chrome/browser/search_engines/template_url_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/ui/app_list/search/omnibox_provider.h" 5 #include "chrome/browser/ui/app_list/search/omnibox_provider.h"
6 6
7 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 7 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
8 #include "chrome/browser/autocomplete/autocomplete_controller.h" 8 #include "chrome/browser/autocomplete/autocomplete_controller.h"
9 #include "chrome/browser/autocomplete/autocomplete_input.h" 9 #include "chrome/browser/autocomplete/autocomplete_input.h"
10 #include "chrome/browser/autocomplete/autocomplete_match.h" 10 #include "chrome/browser/autocomplete/autocomplete_match.h"
11 #include "chrome/browser/autocomplete/search_provider.h"
11 #include "chrome/browser/ui/app_list/search/chrome_search_result.h" 12 #include "chrome/browser/ui/app_list/search/chrome_search_result.h"
12 #include "chrome/browser/ui/browser_navigator.h" 13 #include "chrome/browser/ui/browser_navigator.h"
13 #include "chrome/common/metrics/proto/omnibox_event.pb.h" 14 #include "chrome/common/metrics/proto/omnibox_event.pb.h"
14 #include "grit/theme_resources.h" 15 #include "grit/theme_resources.h"
15 #include "ui/base/resource/resource_bundle.h" 16 #include "ui/base/resource/resource_bundle.h"
16 17
17 namespace app_list { 18 namespace app_list {
18 19
19 namespace { 20 namespace {
20 21
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 DISALLOW_COPY_AND_ASSIGN(OmniboxResult); 129 DISALLOW_COPY_AND_ASSIGN(OmniboxResult);
129 }; 130 };
130 131
131 } // namespace 132 } // namespace
132 133
133 OmniboxProvider::OmniboxProvider(Profile* profile) 134 OmniboxProvider::OmniboxProvider(Profile* profile)
134 : profile_(profile), 135 : profile_(profile),
135 controller_(new AutocompleteController( 136 controller_(new AutocompleteController(
136 profile, 137 profile,
137 this, 138 this,
138 AutocompleteClassifier::kDefaultOmniboxProviders)) { 139 AutocompleteClassifier::kDefaultOmniboxProviders &
140 ~AutocompleteProvider::TYPE_ZERO_SUGGEST)) {
141 controller_->search_provider()->set_in_app_list();
139 } 142 }
140 143
141 OmniboxProvider::~OmniboxProvider() {} 144 OmniboxProvider::~OmniboxProvider() {}
142 145
143 void OmniboxProvider::Start(const base::string16& query) { 146 void OmniboxProvider::Start(const base::string16& query) {
144 controller_->Start(AutocompleteInput(query, 147 controller_->Start(AutocompleteInput(query,
145 base::string16::npos, 148 base::string16::npos,
146 base::string16(), 149 base::string16(),
147 GURL(), 150 GURL(),
148 AutocompleteInput::INVALID_SPEC, 151 AutocompleteInput::INVALID_SPEC,
(...skipping 19 matching lines...) Expand all
168 new OmniboxResult(profile_, *it)).Pass()); 171 new OmniboxResult(profile_, *it)).Pass());
169 } 172 }
170 } 173 }
171 174
172 void OmniboxProvider::OnResultChanged(bool default_match_changed) { 175 void OmniboxProvider::OnResultChanged(bool default_match_changed) {
173 const AutocompleteResult& result = controller_->result(); 176 const AutocompleteResult& result = controller_->result();
174 PopulateFromACResult(result); 177 PopulateFromACResult(result);
175 } 178 }
176 179
177 } // namespace app_list 180 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698