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

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

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_contents_provider.h" 5 #include "chrome/browser/autocomplete/history_contents_provider.h"
6 6
7 #include "base/histogram.h" 7 #include "base/histogram.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/browser/history/query_parser.h" 9 #include "chrome/browser/history/query_parser.h"
10 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profile.h"
11 #include "net/base/net_util.h" 11 #include "net/base/net_util.h"
12 12
13 using base::TimeTicks;
14
13 namespace { 15 namespace {
14 16
15 // Number of days to search for full text results. The longer this is, the more 17 // Number of days to search for full text results. The longer this is, the more
16 // time it will take. 18 // time it will take.
17 const int kDaysToSearch = 30; 19 const int kDaysToSearch = 30;
18 20
19 // When processing the results from the history query, this structure points to 21 // When processing the results from the history query, this structure points to
20 // a single result. It allows the results to be sorted and processed without 22 // a single result. It allows the results to be sorted and processed without
21 // modifying the larger and slower results structure. 23 // modifying the larger and slower results structure.
22 struct MatchReference { 24 struct MatchReference {
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 UMA_HISTOGRAM_TIMES(L"Omnibox.QueryBookmarksTime", 276 UMA_HISTOGRAM_TIMES(L"Omnibox.QueryBookmarksTime",
275 TimeTicks::Now() - start_time); 277 TimeTicks::Now() - start_time);
276 } 278 }
277 279
278 void HistoryContentsProvider::AddBookmarkTitleMatchToResults( 280 void HistoryContentsProvider::AddBookmarkTitleMatchToResults(
279 const BookmarkModel::TitleMatch& match) { 281 const BookmarkModel::TitleMatch& match) {
280 history::URLResult url_result(match.node->GetURL(), match.match_positions); 282 history::URLResult url_result(match.node->GetURL(), match.match_positions);
281 url_result.set_title(match.node->GetTitle()); 283 url_result.set_title(match.node->GetTitle());
282 results_.AppendURLBySwapping(&url_result); 284 results_.AppendURLBySwapping(&url_result);
283 } 285 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698