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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 type_ = UNVISITED_INTRANET; | 288 type_ = UNVISITED_INTRANET; |
289 } | 289 } |
290 } | 290 } |
291 | 291 |
292 HistoryURLProviderParams::HistoryURLProviderParams( | 292 HistoryURLProviderParams::HistoryURLProviderParams( |
293 const AutocompleteInput& input, | 293 const AutocompleteInput& input, |
294 bool trim_http, | 294 bool trim_http, |
295 const std::string& languages, | 295 const std::string& languages, |
296 TemplateURL* default_search_provider, | 296 TemplateURL* default_search_provider, |
297 const SearchTermsData& search_terms_data) | 297 const SearchTermsData& search_terms_data) |
298 : message_loop(MessageLoop::current()), | 298 : message_loop(base::MessageLoop::current()), |
299 input(input), | 299 input(input), |
300 prevent_inline_autocomplete(input.prevent_inline_autocomplete()), | 300 prevent_inline_autocomplete(input.prevent_inline_autocomplete()), |
301 trim_http(trim_http), | 301 trim_http(trim_http), |
302 failed(false), | 302 failed(false), |
303 languages(languages), | 303 languages(languages), |
304 dont_suggest_exact_input(false), | 304 dont_suggest_exact_input(false), |
305 default_search_provider(default_search_provider ? | 305 default_search_provider( |
306 new TemplateURL(default_search_provider->profile(), | 306 default_search_provider |
307 default_search_provider->data()) : NULL), | 307 ? new TemplateURL(default_search_provider->profile(), |
308 search_terms_data(new SearchTermsDataSnapshot(search_terms_data)) { | 308 default_search_provider->data()) |
309 } | 309 : NULL), |
| 310 search_terms_data(new SearchTermsDataSnapshot(search_terms_data)) {} |
310 | 311 |
311 HistoryURLProviderParams::~HistoryURLProviderParams() { | 312 HistoryURLProviderParams::~HistoryURLProviderParams() { |
312 } | 313 } |
313 | 314 |
314 HistoryURLProvider::HistoryURLProvider(AutocompleteProviderListener* listener, | 315 HistoryURLProvider::HistoryURLProvider(AutocompleteProviderListener* listener, |
315 Profile* profile) | 316 Profile* profile) |
316 : HistoryProvider(listener, profile, | 317 : HistoryProvider(listener, profile, |
317 AutocompleteProvider::TYPE_HISTORY_URL), | 318 AutocompleteProvider::TYPE_HISTORY_URL), |
318 params_(NULL), | 319 params_(NULL), |
319 cull_redirects_( | 320 cull_redirects_( |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 &match.contents_class); | 1075 &match.contents_class); |
1075 } | 1076 } |
1076 match.description = info.title(); | 1077 match.description = info.title(); |
1077 AutocompleteMatch::ClassifyMatchInString(params->input.text(), | 1078 AutocompleteMatch::ClassifyMatchInString(params->input.text(), |
1078 info.title(), | 1079 info.title(), |
1079 ACMatchClassification::NONE, | 1080 ACMatchClassification::NONE, |
1080 &match.description_class); | 1081 &match.description_class); |
1081 RecordAdditionalInfoFromUrlRow(info, &match); | 1082 RecordAdditionalInfoFromUrlRow(info, &match); |
1082 return match; | 1083 return match; |
1083 } | 1084 } |
OLD | NEW |