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

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

Issue 6258015: Remove wstring from autocomplete.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_provider_util.h" 5 #include "chrome/browser/autocomplete/history_provider_util.h"
6 6
7 namespace history { 7 namespace history {
8 8
9 const int kLowQualityMatchTypedLimit = 1; 9 const int kLowQualityMatchTypedLimit = 1;
10 const int kLowQualityMatchVisitLimit = 3; 10 const int kLowQualityMatchVisitLimit = 3;
11 const int kLowQualityMatchAgeLimitInDays = 3; 11 const int kLowQualityMatchAgeLimitInDays = 3;
12 12
13 HistoryMatch::HistoryMatch() 13 HistoryMatch::HistoryMatch()
14 : url_info(), 14 : url_info(),
15 input_location(std::wstring::npos), 15 input_location(string16::npos),
16 match_in_scheme(false), 16 match_in_scheme(false),
17 innermost_match(true) { 17 innermost_match(true) {
18 } 18 }
19 19
20 HistoryMatch::HistoryMatch(const URLRow& url_info, 20 HistoryMatch::HistoryMatch(const URLRow& url_info,
21 size_t input_location, 21 size_t input_location,
22 bool match_in_scheme, 22 bool match_in_scheme,
23 bool innermost_match) 23 bool innermost_match)
24 : url_info(url_info), 24 : url_info(url_info),
25 input_location(input_location), 25 input_location(input_location),
26 match_in_scheme(match_in_scheme), 26 match_in_scheme(match_in_scheme),
27 innermost_match(innermost_match) { 27 innermost_match(innermost_match) {
28 } 28 }
29 29
30 bool HistoryMatch::operator==(const GURL& url) const { 30 bool HistoryMatch::operator==(const GURL& url) const {
31 return url_info.url() == url; 31 return url_info.url() == url;
32 } 32 }
33 33
34 base::Time AutocompleteAgeThreshold() { 34 base::Time AutocompleteAgeThreshold() {
35 return (base::Time::Now() - 35 return (base::Time::Now() -
36 base::TimeDelta::FromDays(kLowQualityMatchAgeLimitInDays)); 36 base::TimeDelta::FromDays(kLowQualityMatchAgeLimitInDays));
37 } 37 }
38 38
39 } 39 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/history_provider_util.h ('k') | chrome/browser/autocomplete/history_quick_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698