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

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

Issue 28046: Use string for Histogram names since these are all ASCII anyway wide-characte... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « base/process_util_win.cc ('k') | chrome/browser/autocomplete/history_url_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/bookmarks/bookmark_model.h" 9 #include "chrome/browser/bookmarks/bookmark_model.h"
10 #include "chrome/browser/history/query_parser.h" 10 #include "chrome/browser/history/query_parser.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 DCHECK(results_.size() == 0); // When we get here the results should be 272 DCHECK(results_.size() == 0); // When we get here the results should be
273 // empty. 273 // empty.
274 274
275 TimeTicks start_time = TimeTicks::Now(); 275 TimeTicks start_time = TimeTicks::Now();
276 std::vector<bookmark_utils::TitleMatch> matches; 276 std::vector<bookmark_utils::TitleMatch> matches;
277 bookmark_utils::GetBookmarksMatchingText(bookmark_model, input.text(), 277 bookmark_utils::GetBookmarksMatchingText(bookmark_model, input.text(),
278 kMaxMatchCount, &matches); 278 kMaxMatchCount, &matches);
279 for (size_t i = 0; i < matches.size(); ++i) 279 for (size_t i = 0; i < matches.size(); ++i)
280 AddBookmarkTitleMatchToResults(matches[i]); 280 AddBookmarkTitleMatchToResults(matches[i]);
281 UMA_HISTOGRAM_TIMES(L"Omnibox.QueryBookmarksTime", 281 UMA_HISTOGRAM_TIMES("Omnibox.QueryBookmarksTime",
282 TimeTicks::Now() - start_time); 282 TimeTicks::Now() - start_time);
283 } 283 }
284 284
285 void HistoryContentsProvider::AddBookmarkTitleMatchToResults( 285 void HistoryContentsProvider::AddBookmarkTitleMatchToResults(
286 const bookmark_utils::TitleMatch& match) { 286 const bookmark_utils::TitleMatch& match) {
287 history::URLResult url_result(match.node->GetURL(), match.match_positions); 287 history::URLResult url_result(match.node->GetURL(), match.match_positions);
288 url_result.set_title(match.node->GetTitle()); 288 url_result.set_title(match.node->GetTitle());
289 results_.AppendURLBySwapping(&url_result); 289 results_.AppendURLBySwapping(&url_result);
290 } 290 }
OLDNEW
« no previous file with comments | « base/process_util_win.cc ('k') | chrome/browser/autocomplete/history_url_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698