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

Side by Side Diff: chrome/browser/autocomplete/history_url_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
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_url_provider.h" 5 #include "chrome/browser/autocomplete/history_url_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/histogram.h" 9 #include "base/histogram.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 void HistoryURLProvider::ExecuteWithDB(history::HistoryBackend* backend, 110 void HistoryURLProvider::ExecuteWithDB(history::HistoryBackend* backend,
111 history::URLDatabase* db, 111 history::URLDatabase* db,
112 HistoryURLProviderParams* params) { 112 HistoryURLProviderParams* params) {
113 // We may get called with a NULL database if it couldn't be properly 113 // We may get called with a NULL database if it couldn't be properly
114 // initialized. In this case we just say the query is complete. 114 // initialized. In this case we just say the query is complete.
115 if (db && !params->cancel) { 115 if (db && !params->cancel) {
116 TimeTicks beginning_time = TimeTicks::Now(); 116 TimeTicks beginning_time = TimeTicks::Now();
117 117
118 DoAutocomplete(backend, db, params); 118 DoAutocomplete(backend, db, params);
119 119
120 HISTOGRAM_TIMES(L"Autocomplete.HistoryAsyncQueryTime", 120 HISTOGRAM_TIMES("Autocomplete.HistoryAsyncQueryTime",
121 TimeTicks::Now() - beginning_time); 121 TimeTicks::Now() - beginning_time);
122 } 122 }
123 123
124 // Return the results (if any) to the main thread. 124 // Return the results (if any) to the main thread.
125 params->message_loop->PostTask(FROM_HERE, NewRunnableMethod( 125 params->message_loop->PostTask(FROM_HERE, NewRunnableMethod(
126 this, &HistoryURLProvider::QueryComplete, params)); 126 this, &HistoryURLProvider::QueryComplete, params));
127 } 127 }
128 128
129 // Used by both autocomplete passes, and therefore called on multiple different 129 // Used by both autocomplete passes, and therefore called on multiple different
130 // threads (though not simultaneously). 130 // threads (though not simultaneously).
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 history_match.input_location - offset, params->input.text().length(), 820 history_match.input_location - offset, params->input.text().length(),
821 match.contents.length(), ACMatchClassification::URL, 821 match.contents.length(), ACMatchClassification::URL,
822 &match.contents_class); 822 &match.contents_class);
823 match.description = info.title(); 823 match.description = info.title();
824 AutocompleteMatch::ClassifyMatchInString(params->input.text(), info.title(), 824 AutocompleteMatch::ClassifyMatchInString(params->input.text(), info.title(),
825 ACMatchClassification::NONE, 825 ACMatchClassification::NONE,
826 &match.description_class); 826 &match.description_class);
827 827
828 return match; 828 return match;
829 } 829 }
830
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/history_contents_provider.cc ('k') | chrome/browser/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698