| 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_quick_provider.h" | 5 #include "chrome/browser/autocomplete/history_quick_provider.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/command_line.h" | |
| 11 #include "base/debug/crash_logging.h" | 10 #include "base/debug/crash_logging.h" |
| 12 #include "base/i18n/break_iterator.h" | 11 #include "base/i18n/break_iterator.h" |
| 13 #include "base/logging.h" | 12 #include "base/logging.h" |
| 14 #include "base/metrics/field_trial.h" | 13 #include "base/metrics/field_trial.h" |
| 15 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
| 16 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 17 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
| 18 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 19 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" | 18 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" |
| 20 #include "chrome/browser/autocomplete/history_url_provider.h" | 19 #include "chrome/browser/autocomplete/history_url_provider.h" |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 !PreventInlineAutocomplete(autocomplete_input_); | 269 !PreventInlineAutocomplete(autocomplete_input_); |
| 271 } | 270 } |
| 272 match.EnsureUWYTIsAllowedToBeDefault( | 271 match.EnsureUWYTIsAllowedToBeDefault( |
| 273 autocomplete_input_.canonicalized_url(), | 272 autocomplete_input_.canonicalized_url(), |
| 274 TemplateURLServiceFactory::GetForProfile(profile_)); | 273 TemplateURLServiceFactory::GetForProfile(profile_)); |
| 275 | 274 |
| 276 // Format the description autocomplete presentation. | 275 // Format the description autocomplete presentation. |
| 277 match.description = info.title(); | 276 match.description = info.title(); |
| 278 match.description_class = SpansFromTermMatch( | 277 match.description_class = SpansFromTermMatch( |
| 279 history_match.title_matches, match.description.length(), false); | 278 history_match.title_matches, match.description.length(), false); |
| 279 match.PossiblySwapContentsAndDescriptionForURLSuggestion( |
| 280 autocomplete_input_); |
| 280 | 281 |
| 281 match.RecordAdditionalInfo("typed count", info.typed_count()); | 282 match.RecordAdditionalInfo("typed count", info.typed_count()); |
| 282 match.RecordAdditionalInfo("visit count", info.visit_count()); | 283 match.RecordAdditionalInfo("visit count", info.visit_count()); |
| 283 match.RecordAdditionalInfo("last visit", info.last_visit()); | 284 match.RecordAdditionalInfo("last visit", info.last_visit()); |
| 284 | 285 |
| 285 return match; | 286 return match; |
| 286 } | 287 } |
| OLD | NEW |