| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/i18n/break_iterator.h" | 10 #include "base/i18n/break_iterator.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
| 23 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
| 24 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
| 25 #include "content/public/browser/notification_source.h" | 25 #include "content/public/browser/notification_source.h" |
| 26 #include "content/public/browser/notification_types.h" | 26 #include "content/public/browser/notification_types.h" |
| 27 #include "googleurl/src/url_parse.h" | 27 #include "googleurl/src/url_parse.h" |
| 28 #include "googleurl/src/url_util.h" | 28 #include "googleurl/src/url_util.h" |
| 29 #include "net/base/escape.h" | 29 #include "net/base/escape.h" |
| 30 #include "net/base/net_util.h" | 30 #include "net/base/net_util.h" |
| 31 | 31 |
| 32 using history::InMemoryURLIndex; |
| 32 using history::ScoredHistoryMatch; | 33 using history::ScoredHistoryMatch; |
| 33 using history::ScoredHistoryMatches; | 34 using history::ScoredHistoryMatches; |
| 34 | 35 |
| 35 bool HistoryQuickProvider::disabled_ = false; | 36 bool HistoryQuickProvider::disabled_ = false; |
| 36 | 37 |
| 37 HistoryQuickProvider::HistoryQuickProvider(ACProviderListener* listener, | 38 HistoryQuickProvider::HistoryQuickProvider(ACProviderListener* listener, |
| 38 Profile* profile) | 39 Profile* profile) |
| 39 : HistoryProvider(listener, profile, "HistoryQuickProvider"), | 40 : HistoryProvider(listener, profile, "HistoryQuickProvider"), |
| 40 languages_(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)) {} | 41 languages_(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)) {} |
| 41 | 42 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 do { | 208 do { |
| 208 offset += matches[i].length; | 209 offset += matches[i].length; |
| 209 ++i; | 210 ++i; |
| 210 } while ((i < match_count) && (offset == matches[i].offset)); | 211 } while ((i < match_count) && (offset == matches[i].offset)); |
| 211 if (offset < text_length) | 212 if (offset < text_length) |
| 212 spans.push_back(ACMatchClassification(offset, url_style)); | 213 spans.push_back(ACMatchClassification(offset, url_style)); |
| 213 } | 214 } |
| 214 | 215 |
| 215 return spans; | 216 return spans; |
| 216 } | 217 } |
| OLD | NEW |