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

Side by Side Diff: chrome/browser/metrics/metrics_log.cc

Issue 11316057: Omnibox: Log Elapsed Time Since Last Time The Default Match Changed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 omnibox_event->set_num_typed_terms(num_terms); 971 omnibox_event->set_num_typed_terms(num_terms);
972 omnibox_event->set_selected_index(log.selected_index); 972 omnibox_event->set_selected_index(log.selected_index);
973 if (log.inline_autocompleted_length != string16::npos) 973 if (log.inline_autocompleted_length != string16::npos)
974 omnibox_event->set_completed_length(log.inline_autocompleted_length); 974 omnibox_event->set_completed_length(log.inline_autocompleted_length);
975 if (log.elapsed_time_since_user_first_modified_omnibox != 975 if (log.elapsed_time_since_user_first_modified_omnibox !=
976 base::TimeDelta::FromMilliseconds(-1)) { 976 base::TimeDelta::FromMilliseconds(-1)) {
977 // Only upload the typing duration if it is set/valid. 977 // Only upload the typing duration if it is set/valid.
978 omnibox_event->set_typing_duration_ms( 978 omnibox_event->set_typing_duration_ms(
979 log.elapsed_time_since_user_first_modified_omnibox.InMilliseconds()); 979 log.elapsed_time_since_user_first_modified_omnibox.InMilliseconds());
980 } 980 }
981 omnibox_event->set_duration_since_last_default_match_update_ms(
982 log.elapsed_time_since_last_change_to_default_match.InMilliseconds());
981 omnibox_event->set_current_page_classification( 983 omnibox_event->set_current_page_classification(
982 log.current_page_classification); 984 log.current_page_classification);
983 omnibox_event->set_input_type(AsOmniboxEventInputType(log.input_type)); 985 omnibox_event->set_input_type(AsOmniboxEventInputType(log.input_type));
984 for (AutocompleteResult::const_iterator i(log.result.begin()); 986 for (AutocompleteResult::const_iterator i(log.result.begin());
985 i != log.result.end(); ++i) { 987 i != log.result.end(); ++i) {
986 OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion(); 988 OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion();
987 suggestion->set_provider(i->provider->AsOmniboxEventProviderType()); 989 suggestion->set_provider(i->provider->AsOmniboxEventProviderType());
988 suggestion->set_result_type(AsOmniboxEventResultType(i->type)); 990 suggestion->set_result_type(AsOmniboxEventResultType(i->type));
989 suggestion->set_relevance(i->relevance); 991 suggestion->set_relevance(i->relevance);
990 if (i->typed_count != -1) 992 if (i->typed_count != -1)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 ProductDataToProto(google_update_metrics.google_update_data, 1025 ProductDataToProto(google_update_metrics.google_update_data,
1024 google_update->mutable_google_update_status()); 1026 google_update->mutable_google_update_status());
1025 } 1027 }
1026 1028
1027 if (!google_update_metrics.product_data.version.empty()) { 1029 if (!google_update_metrics.product_data.version.empty()) {
1028 ProductDataToProto(google_update_metrics.product_data, 1030 ProductDataToProto(google_update_metrics.product_data,
1029 google_update->mutable_client_status()); 1031 google_update->mutable_client_status());
1030 } 1032 }
1031 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) 1033 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN)
1032 } 1034 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_log.cc ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698