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" | 10 #include "base/command_line.h" |
11 #include "base/i18n/break_iterator.h" | 11 #include "base/i18n/break_iterator.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/metrics/field_trial.h" | 13 #include "base/metrics/field_trial.h" |
14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
15 #include "base/string_number_conversions.h" | 15 #include "base/string_number_conversions.h" |
16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
17 #include "base/time.h" | 17 #include "base/time.h" |
18 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
19 #include "chrome/browser/autocomplete/autocomplete_field_trial.h" | 19 #include "chrome/browser/autocomplete/autocomplete_field_trial.h" |
| 20 #include "chrome/browser/autocomplete/autocomplete_result.h" |
20 #include "chrome/browser/history/history.h" | 21 #include "chrome/browser/history/history.h" |
21 #include "chrome/browser/history/history_service_factory.h" | 22 #include "chrome/browser/history/history_service_factory.h" |
22 #include "chrome/browser/history/in_memory_url_index.h" | 23 #include "chrome/browser/history/in_memory_url_index.h" |
23 #include "chrome/browser/history/in_memory_url_index_types.h" | 24 #include "chrome/browser/history/in_memory_url_index_types.h" |
24 #include "chrome/browser/history/scored_history_match.h" | 25 #include "chrome/browser/history/scored_history_match.h" |
25 #include "chrome/browser/net/url_fixer_upper.h" | 26 #include "chrome/browser/net/url_fixer_upper.h" |
26 #include "chrome/browser/prefs/pref_service.h" | 27 #include "chrome/browser/prefs/pref_service.h" |
27 #include "chrome/browser/profiles/profile.h" | 28 #include "chrome/browser/profiles/profile.h" |
28 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
29 #include "chrome/common/pref_names.h" | 30 #include "chrome/common/pref_names.h" |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 do { | 284 do { |
284 offset += matches[i].length; | 285 offset += matches[i].length; |
285 ++i; | 286 ++i; |
286 } while ((i < match_count) && (offset == matches[i].offset)); | 287 } while ((i < match_count) && (offset == matches[i].offset)); |
287 if (offset < text_length) | 288 if (offset < text_length) |
288 spans.push_back(ACMatchClassification(offset, url_style)); | 289 spans.push_back(ACMatchClassification(offset, url_style)); |
289 } | 290 } |
290 | 291 |
291 return spans; | 292 return spans; |
292 } | 293 } |
OLD | NEW |