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

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

Issue 12211105: Move remaining non-test, non-Chrome-specific Prefs code to base/prefs/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, merge to LKGR. Created 7 years, 10 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/bookmark_provider.h" 5 #include "chrome/browser/autocomplete/bookmark_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/prefs/pref_service.h"
12 #include "base/time.h" 13 #include "base/time.h"
13 #include "chrome/browser/autocomplete/autocomplete_result.h" 14 #include "chrome/browser/autocomplete/autocomplete_result.h"
14 #include "chrome/browser/bookmarks/bookmark_model.h" 15 #include "chrome/browser/bookmarks/bookmark_model.h"
15 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 16 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
16 #include "chrome/browser/prefs/pref_service.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
19 #include "net/base/net_util.h" 19 #include "net/base/net_util.h"
20 20
21 typedef std::vector<bookmark_utils::TitleMatch> TitleMatches; 21 typedef std::vector<bookmark_utils::TitleMatch> TitleMatches;
22 22
23 // BookmarkProvider ------------------------------------------------------------ 23 // BookmarkProvider ------------------------------------------------------------
24 24
25 BookmarkProvider::BookmarkProvider( 25 BookmarkProvider::BookmarkProvider(
26 AutocompleteProviderListener* listener, 26 AutocompleteProviderListener* listener,
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 for (Snippet::MatchPositions::const_iterator i = positions.begin(); 263 for (Snippet::MatchPositions::const_iterator i = positions.begin();
264 i != positions.end(); ++i) { 264 i != positions.end(); ++i) {
265 AutocompleteMatch::ACMatchClassifications new_class; 265 AutocompleteMatch::ACMatchClassifications new_class;
266 AutocompleteMatch::ClassifyLocationInString(i->first, i->second - i->first, 266 AutocompleteMatch::ClassifyLocationInString(i->first, i->second - i->first,
267 text_length, 0, &new_class); 267 text_length, 0, &new_class);
268 classifications = AutocompleteMatch::MergeClassifications( 268 classifications = AutocompleteMatch::MergeClassifications(
269 classifications, new_class); 269 classifications, new_class);
270 } 270 }
271 return classifications; 271 return classifications;
272 } 272 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_provider.cc ('k') | chrome/browser/autocomplete/history_quick_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698