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/prefs/pref_service.h" |
15 #include "base/string_util.h" | 16 #include "base/string_util.h" |
16 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
17 #include "base/time.h" | 18 #include "base/time.h" |
18 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
19 #include "chrome/browser/autocomplete/autocomplete_field_trial.h" | 20 #include "chrome/browser/autocomplete/autocomplete_field_trial.h" |
20 #include "chrome/browser/autocomplete/autocomplete_result.h" | 21 #include "chrome/browser/autocomplete/autocomplete_result.h" |
21 #include "chrome/browser/autocomplete/history_url_provider.h" | 22 #include "chrome/browser/autocomplete/history_url_provider.h" |
22 #include "chrome/browser/history/history_database.h" | 23 #include "chrome/browser/history/history_database.h" |
23 #include "chrome/browser/history/history_service.h" | 24 #include "chrome/browser/history/history_service.h" |
24 #include "chrome/browser/history/history_service_factory.h" | 25 #include "chrome/browser/history/history_service_factory.h" |
25 #include "chrome/browser/history/in_memory_url_index.h" | 26 #include "chrome/browser/history/in_memory_url_index.h" |
26 #include "chrome/browser/history/in_memory_url_index_types.h" | 27 #include "chrome/browser/history/in_memory_url_index_types.h" |
27 #include "chrome/browser/history/scored_history_match.h" | 28 #include "chrome/browser/history/scored_history_match.h" |
28 #include "chrome/browser/net/url_fixer_upper.h" | 29 #include "chrome/browser/net/url_fixer_upper.h" |
29 #include "chrome/browser/prefs/pref_service.h" | |
30 #include "chrome/browser/profiles/profile.h" | 30 #include "chrome/browser/profiles/profile.h" |
31 #include "chrome/common/chrome_switches.h" | 31 #include "chrome/common/chrome_switches.h" |
32 #include "chrome/common/pref_names.h" | 32 #include "chrome/common/pref_names.h" |
33 #include "chrome/common/url_constants.h" | 33 #include "chrome/common/url_constants.h" |
34 #include "content/public/browser/browser_thread.h" | 34 #include "content/public/browser/browser_thread.h" |
35 #include "content/public/browser/notification_source.h" | 35 #include "content/public/browser/notification_source.h" |
36 #include "content/public/browser/notification_types.h" | 36 #include "content/public/browser/notification_types.h" |
37 #include "googleurl/src/url_parse.h" | 37 #include "googleurl/src/url_parse.h" |
38 #include "googleurl/src/url_util.h" | 38 #include "googleurl/src/url_util.h" |
39 #include "net/base/escape.h" | 39 #include "net/base/escape.h" |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 do { | 397 do { |
398 offset += matches[i].length; | 398 offset += matches[i].length; |
399 ++i; | 399 ++i; |
400 } while ((i < match_count) && (offset == matches[i].offset)); | 400 } while ((i < match_count) && (offset == matches[i].offset)); |
401 if (offset < text_length) | 401 if (offset < text_length) |
402 spans.push_back(ACMatchClassification(offset, url_style)); | 402 spans.push_back(ACMatchClassification(offset, url_style)); |
403 } | 403 } |
404 | 404 |
405 return spans; | 405 return spans; |
406 } | 406 } |
OLD | NEW |