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

Side by Side Diff: components/omnibox/search_provider.cc

Issue 489353004: Componentize SearchProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « components/omnibox/search_provider.h ('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 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 #include "chrome/browser/autocomplete/search_provider.h" 5 #include "components/omnibox/search_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/i18n/break_iterator.h" 12 #include "base/i18n/break_iterator.h"
13 #include "base/i18n/case_conversion.h" 13 #include "base/i18n/case_conversion.h"
14 #include "base/json/json_string_value_serializer.h" 14 #include "base/json/json_string_value_serializer.h"
15 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 match->fill_into_edit.empty()) 1247 match->fill_into_edit.empty())
1248 return; 1248 return;
1249 1249
1250 // Valid answer encountered, cache it for further queries. 1250 // Valid answer encountered, cache it for further queries.
1251 answers_cache_.UpdateRecentAnswers(match->fill_into_edit, match->answer_type); 1251 answers_cache_.UpdateRecentAnswers(match->fill_into_edit, match->answer_type);
1252 } 1252 }
1253 1253
1254 void SearchProvider::DoAnswersQuery(const AutocompleteInput& input) { 1254 void SearchProvider::DoAnswersQuery(const AutocompleteInput& input) {
1255 prefetch_data_ = answers_cache_.GetTopAnswerEntry(input.text()); 1255 prefetch_data_ = answers_cache_.GetTopAnswerEntry(input.text());
1256 } 1256 }
OLDNEW
« no previous file with comments | « components/omnibox/search_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698