OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/history_url_provider.h" | 5 #include "chrome/browser/autocomplete/history_url_provider.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 TemplateURL* default_search_provider, | 396 TemplateURL* default_search_provider, |
397 const SearchTermsData& search_terms_data) | 397 const SearchTermsData& search_terms_data) |
398 : message_loop(base::MessageLoop::current()), | 398 : message_loop(base::MessageLoop::current()), |
399 input(input), | 399 input(input), |
400 prevent_inline_autocomplete(input.prevent_inline_autocomplete()), | 400 prevent_inline_autocomplete(input.prevent_inline_autocomplete()), |
401 trim_http(trim_http), | 401 trim_http(trim_http), |
402 failed(false), | 402 failed(false), |
403 languages(languages), | 403 languages(languages), |
404 dont_suggest_exact_input(false), | 404 dont_suggest_exact_input(false), |
405 default_search_provider(default_search_provider ? | 405 default_search_provider(default_search_provider ? |
406 new TemplateURL(default_search_provider->profile(), | 406 new TemplateURL(default_search_provider->data()) : NULL), |
407 default_search_provider->data()) : NULL), | |
408 search_terms_data(new SearchTermsDataSnapshot(search_terms_data)) { | 407 search_terms_data(new SearchTermsDataSnapshot(search_terms_data)) { |
409 } | 408 } |
410 | 409 |
411 HistoryURLProviderParams::~HistoryURLProviderParams() { | 410 HistoryURLProviderParams::~HistoryURLProviderParams() { |
412 } | 411 } |
413 | 412 |
414 HistoryURLProvider::HistoryURLProvider(AutocompleteProviderListener* listener, | 413 HistoryURLProvider::HistoryURLProvider(AutocompleteProviderListener* listener, |
415 Profile* profile) | 414 Profile* profile) |
416 : HistoryProvider(listener, profile, | 415 : HistoryProvider(listener, profile, |
417 AutocompleteProvider::TYPE_HISTORY_URL), | 416 AutocompleteProvider::TYPE_HISTORY_URL), |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 AutocompleteMatch::ClassifyLocationInString(base::string16::npos, 0, | 1156 AutocompleteMatch::ClassifyLocationInString(base::string16::npos, 0, |
1158 match.contents.length(), ACMatchClassification::URL, | 1157 match.contents.length(), ACMatchClassification::URL, |
1159 &match.contents_class); | 1158 &match.contents_class); |
1160 } | 1159 } |
1161 match.description = info.title(); | 1160 match.description = info.title(); |
1162 match.description_class = | 1161 match.description_class = |
1163 ClassifyDescription(params.input.text(), match.description); | 1162 ClassifyDescription(params.input.text(), match.description); |
1164 RecordAdditionalInfoFromUrlRow(info, &match); | 1163 RecordAdditionalInfoFromUrlRow(info, &match); |
1165 return match; | 1164 return match; |
1166 } | 1165 } |
OLD | NEW |