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/metrics/metrics_log.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/metrics/metrics_log.h" 5 #include "chrome/browser/metrics/metrics_log.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 } 936 }
937 omnibox_event->set_current_page_classification( 937 omnibox_event->set_current_page_classification(
938 log.current_page_classification); 938 log.current_page_classification);
939 omnibox_event->set_input_type(AsOmniboxEventInputType(log.input_type)); 939 omnibox_event->set_input_type(AsOmniboxEventInputType(log.input_type));
940 for (AutocompleteResult::const_iterator i(log.result.begin()); 940 for (AutocompleteResult::const_iterator i(log.result.begin());
941 i != log.result.end(); ++i) { 941 i != log.result.end(); ++i) {
942 OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion(); 942 OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion();
943 suggestion->set_provider(i->provider->AsOmniboxEventProviderType()); 943 suggestion->set_provider(i->provider->AsOmniboxEventProviderType());
944 suggestion->set_result_type(AsOmniboxEventResultType(i->type)); 944 suggestion->set_result_type(AsOmniboxEventResultType(i->type));
945 suggestion->set_relevance(i->relevance); 945 suggestion->set_relevance(i->relevance);
946 if (i->typed_count != -1)
947 suggestion->set_typed_count(i->typed_count);
946 suggestion->set_is_starred(i->starred); 948 suggestion->set_is_starred(i->starred);
947 } 949 }
948 for (ProvidersInfo::const_iterator i(log.providers_info.begin()); 950 for (ProvidersInfo::const_iterator i(log.providers_info.begin());
949 i != log.providers_info.end(); ++i) { 951 i != log.providers_info.end(); ++i) {
950 OmniboxEventProto::ProviderInfo* provider_info = 952 OmniboxEventProto::ProviderInfo* provider_info =
951 omnibox_event->add_provider_info(); 953 omnibox_event->add_provider_info();
952 provider_info->CopyFrom(*i); 954 provider_info->CopyFrom(*i);
953 } 955 }
954 956
955 ++num_events_; 957 ++num_events_;
(...skipping 21 matching lines...) Expand all
977 ProductDataToProto(google_update_metrics.google_update_data, 979 ProductDataToProto(google_update_metrics.google_update_data,
978 google_update->mutable_google_update_status()); 980 google_update->mutable_google_update_status());
979 } 981 }
980 982
981 if (!google_update_metrics.product_data.version.empty()) { 983 if (!google_update_metrics.product_data.version.empty()) {
982 ProductDataToProto(google_update_metrics.product_data, 984 ProductDataToProto(google_update_metrics.product_data,
983 google_update->mutable_client_status()); 985 google_update->mutable_client_status());
984 } 986 }
985 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) 987 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN)
986 } 988 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/history_url_provider.cc ('k') | chrome/common/metrics/proto/omnibox_event.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698