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

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

Issue 10544114: Omnibox: In UMA logs, record typed_count of URLS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Grammar in comment. Created 8 years, 6 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/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/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 } 886 }
887 887
888 AutocompleteMatch HistoryURLProvider::HistoryMatchToACMatch( 888 AutocompleteMatch HistoryURLProvider::HistoryMatchToACMatch(
889 HistoryURLProviderParams* params, 889 HistoryURLProviderParams* params,
890 const history::HistoryMatch& history_match, 890 const history::HistoryMatch& history_match,
891 MatchType match_type, 891 MatchType match_type,
892 int relevance) { 892 int relevance) {
893 const history::URLRow& info = history_match.url_info; 893 const history::URLRow& info = history_match.url_info;
894 AutocompleteMatch match(this, relevance, 894 AutocompleteMatch match(this, relevance,
895 !!info.visit_count(), AutocompleteMatch::HISTORY_URL); 895 !!info.visit_count(), AutocompleteMatch::HISTORY_URL);
896 match.typed_count = info.typed_count();
896 match.destination_url = info.url(); 897 match.destination_url = info.url();
897 DCHECK(match.destination_url.is_valid()); 898 DCHECK(match.destination_url.is_valid());
898 size_t inline_autocomplete_offset = 899 size_t inline_autocomplete_offset =
899 history_match.input_location + params->input.text().length(); 900 history_match.input_location + params->input.text().length();
900 std::string languages = (match_type == WHAT_YOU_TYPED) ? 901 std::string languages = (match_type == WHAT_YOU_TYPED) ?
901 std::string() : params->languages; 902 std::string() : params->languages;
902 const net::FormatUrlTypes format_types = net::kFormatUrlOmitAll & 903 const net::FormatUrlTypes format_types = net::kFormatUrlOmitAll &
903 ~((params->trim_http && !history_match.match_in_scheme) ? 904 ~((params->trim_http && !history_match.match_in_scheme) ?
904 0 : net::kFormatUrlOmitHTTP); 905 0 : net::kFormatUrlOmitHTTP);
905 match.fill_into_edit = 906 match.fill_into_edit =
(...skipping 22 matching lines...) Expand all
928 &match.contents_class); 929 &match.contents_class);
929 } 930 }
930 match.description = info.title(); 931 match.description = info.title();
931 AutocompleteMatch::ClassifyMatchInString(params->input.text(), 932 AutocompleteMatch::ClassifyMatchInString(params->input.text(),
932 info.title(), 933 info.title(),
933 ACMatchClassification::NONE, 934 ACMatchClassification::NONE,
934 &match.description_class); 935 &match.description_class);
935 936
936 return match; 937 return match;
937 } 938 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/history_quick_provider.cc ('k') | chrome/browser/metrics/metrics_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698