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

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

Issue 10909130: autocomplete: Add AutocompleteProvider::Type enum. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add !! for windows Created 8 years, 3 months 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) 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"
(...skipping 28 matching lines...) Expand all
39 39
40 using history::InMemoryURLIndex; 40 using history::InMemoryURLIndex;
41 using history::ScoredHistoryMatch; 41 using history::ScoredHistoryMatch;
42 using history::ScoredHistoryMatches; 42 using history::ScoredHistoryMatches;
43 43
44 bool HistoryQuickProvider::disabled_ = false; 44 bool HistoryQuickProvider::disabled_ = false;
45 45
46 HistoryQuickProvider::HistoryQuickProvider( 46 HistoryQuickProvider::HistoryQuickProvider(
47 AutocompleteProviderListener* listener, 47 AutocompleteProviderListener* listener,
48 Profile* profile) 48 Profile* profile)
49 : HistoryProvider(listener, profile, "HistoryQuick"), 49 : HistoryProvider(listener, profile,
50 AutocompleteProvider::TYPE_HISTORY_QUICK),
50 languages_(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)), 51 languages_(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)),
51 reorder_for_inlining_(false) { 52 reorder_for_inlining_(false) {
52 enum InliningOption { 53 enum InliningOption {
53 INLINING_PROHIBITED = 0, 54 INLINING_PROHIBITED = 0,
54 INLINING_ALLOWED = 1, 55 INLINING_ALLOWED = 1,
55 INLINING_AUTO_BUT_NOT_IN_FIELD_TRIAL = 2, 56 INLINING_AUTO_BUT_NOT_IN_FIELD_TRIAL = 2,
56 INLINING_FIELD_TRIAL_DEFAULT_GROUP = 3, 57 INLINING_FIELD_TRIAL_DEFAULT_GROUP = 3,
57 INLINING_FIELD_TRIAL_EXPERIMENT_GROUP = 4, 58 INLINING_FIELD_TRIAL_EXPERIMENT_GROUP = 4,
58 NUM_OPTIONS = 5 59 NUM_OPTIONS = 5
59 }; 60 };
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 do { 289 do {
289 offset += matches[i].length; 290 offset += matches[i].length;
290 ++i; 291 ++i;
291 } while ((i < match_count) && (offset == matches[i].offset)); 292 } while ((i < match_count) && (offset == matches[i].offset));
292 if (offset < text_length) 293 if (offset < text_length)
293 spans.push_back(ACMatchClassification(offset, url_style)); 294 spans.push_back(ACMatchClassification(offset, url_style));
294 } 295 }
295 296
296 return spans; 297 return spans;
297 } 298 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/history_provider.cc ('k') | chrome/browser/autocomplete/history_url_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698