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

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

Issue 22679003: InstantExtended(gtk): Hide top match if told to so. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 base::TimeDelta::FromMilliseconds(-1)) { 850 base::TimeDelta::FromMilliseconds(-1)) {
851 // Only upload the typing duration if it is set/valid. 851 // Only upload the typing duration if it is set/valid.
852 omnibox_event->set_typing_duration_ms( 852 omnibox_event->set_typing_duration_ms(
853 log.elapsed_time_since_user_first_modified_omnibox.InMilliseconds()); 853 log.elapsed_time_since_user_first_modified_omnibox.InMilliseconds());
854 } 854 }
855 omnibox_event->set_duration_since_last_default_match_update_ms( 855 omnibox_event->set_duration_since_last_default_match_update_ms(
856 log.elapsed_time_since_last_change_to_default_match.InMilliseconds()); 856 log.elapsed_time_since_last_change_to_default_match.InMilliseconds());
857 omnibox_event->set_current_page_classification( 857 omnibox_event->set_current_page_classification(
858 AsOmniboxEventPageClassification(log.current_page_classification)); 858 AsOmniboxEventPageClassification(log.current_page_classification));
859 omnibox_event->set_input_type(AsOmniboxEventInputType(log.input_type)); 859 omnibox_event->set_input_type(AsOmniboxEventInputType(log.input_type));
860
861 // The view code to hide the top result is currently only implemented on the
862 // Mac and for views.
863 #if defined(OS_MACOSX) || defined(TOOLKIT_VIEWS)
864 omnibox_event->set_is_top_result_hidden_in_dropdown( 860 omnibox_event->set_is_top_result_hidden_in_dropdown(
865 log.result.ShouldHideTopMatch()); 861 log.result.ShouldHideTopMatch());
866 #endif // defined(OS_MACOSX) || defined(TOOLKIT_VIEWS)
867 862
868 for (AutocompleteResult::const_iterator i(log.result.begin()); 863 for (AutocompleteResult::const_iterator i(log.result.begin());
869 i != log.result.end(); ++i) { 864 i != log.result.end(); ++i) {
870 OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion(); 865 OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion();
871 suggestion->set_provider(i->provider->AsOmniboxEventProviderType()); 866 suggestion->set_provider(i->provider->AsOmniboxEventProviderType());
872 suggestion->set_result_type(AsOmniboxEventResultType(i->type)); 867 suggestion->set_result_type(AsOmniboxEventResultType(i->type));
873 suggestion->set_relevance(i->relevance); 868 suggestion->set_relevance(i->relevance);
874 if (i->typed_count != -1) 869 if (i->typed_count != -1)
875 suggestion->set_typed_count(i->typed_count); 870 suggestion->set_typed_count(i->typed_count);
876 suggestion->set_is_starred(i->starred); 871 suggestion->set_is_starred(i->starred);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 947
953 paired_device->set_vendor_prefix(vendor_prefix); 948 paired_device->set_vendor_prefix(vendor_prefix);
954 } 949 }
955 950
956 paired_device->set_vendor_id(device->GetVendorID()); 951 paired_device->set_vendor_id(device->GetVendorID());
957 paired_device->set_product_id(device->GetProductID()); 952 paired_device->set_product_id(device->GetProductID());
958 paired_device->set_device_id(device->GetDeviceID()); 953 paired_device->set_device_id(device->GetDeviceID());
959 } 954 }
960 #endif // defined(OS_CHROMEOS) 955 #endif // defined(OS_CHROMEOS)
961 } 956 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698