Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: chrome/browser/autocomplete/history_quick_provider.cc

Issue 8451009: HQP Refactoring (in Preparation for SQLite Cache) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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;
33 using history::ScoredHistoryMatch; 32 using history::ScoredHistoryMatch;
34 using history::ScoredHistoryMatches; 33 using history::ScoredHistoryMatches;
35 34
36 bool HistoryQuickProvider::disabled_ = false; 35 bool HistoryQuickProvider::disabled_ = false;
37 36
38 HistoryQuickProvider::HistoryQuickProvider(ACProviderListener* listener, 37 HistoryQuickProvider::HistoryQuickProvider(ACProviderListener* listener,
39 Profile* profile) 38 Profile* profile)
40 : HistoryProvider(listener, profile, "HistoryQuickProvider"), 39 : HistoryProvider(listener, profile, "HistoryQuickProvider"),
41 languages_(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)) {} 40 languages_(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)) {}
42 41
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 do { 207 do {
209 offset += matches[i].length; 208 offset += matches[i].length;
210 ++i; 209 ++i;
211 } while ((i < match_count) && (offset == matches[i].offset)); 210 } while ((i < match_count) && (offset == matches[i].offset));
212 if (offset < text_length) 211 if (offset < text_length)
213 spans.push_back(ACMatchClassification(offset, url_style)); 212 spans.push_back(ACMatchClassification(offset, url_style));
214 } 213 }
215 214
216 return spans; 215 return spans;
217 } 216 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/history_provider.cc ('k') | chrome/browser/autocomplete/history_quick_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698