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

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

Issue 20587003: InstantExtended: record initial focus state for omnibox interactions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments. 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 case AutocompleteInput::INVALID_SPEC: 147 case AutocompleteInput::INVALID_SPEC:
148 return OmniboxEventProto::INVALID_SPEC; 148 return OmniboxEventProto::INVALID_SPEC;
149 case AutocompleteInput::NEW_TAB_PAGE: 149 case AutocompleteInput::NEW_TAB_PAGE:
150 return OmniboxEventProto::NEW_TAB_PAGE; 150 return OmniboxEventProto::NEW_TAB_PAGE;
151 case AutocompleteInput::BLANK: 151 case AutocompleteInput::BLANK:
152 return OmniboxEventProto::BLANK; 152 return OmniboxEventProto::BLANK;
153 case AutocompleteInput::HOMEPAGE: 153 case AutocompleteInput::HOMEPAGE:
154 return OmniboxEventProto::HOMEPAGE; 154 return OmniboxEventProto::HOMEPAGE;
155 case AutocompleteInput::OTHER: 155 case AutocompleteInput::OTHER:
156 return OmniboxEventProto::OTHER; 156 return OmniboxEventProto::OTHER;
157 case AutocompleteInput::INSTANT_NEW_TAB_PAGE: 157 case AutocompleteInput::OBSOLETE_INSTANT_NEW_TAB_PAGE:
158 return OmniboxEventProto::INSTANT_NEW_TAB_PAGE; 158 return OmniboxEventProto::OBSOLETE_INSTANT_NEW_TAB_PAGE;
Ilya Sherman 2013/08/02 21:47:32 nit: NOTREACHED()? Maybe you could even remove th
Mark P 2013/08/02 21:53:24 You realize this suggestion is the exact opposite
Ilya Sherman 2013/08/02 22:01:49 How so? I'm not recommending adding a default cas
Mark P 2013/08/02 22:08:42 Oh, yes, I misread your suggestion. It sounds sma
Mark P 2013/08/06 17:22:14 Please take this suggestion from Ilya before you s
samarth 2013/08/06 17:30:45 Oops sorry. Thanks for catching that. Done. (I
Mark P 2013/08/06 17:34:14 You might as well remove the value from autocomple
samarth 2013/08/06 17:43:03 OK, done.
159 case AutocompleteInput::SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT: 159 case AutocompleteInput::SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT:
160 return OmniboxEventProto:: 160 return OmniboxEventProto::
161 SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT; 161 SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT;
162 case AutocompleteInput::INSTANT_NEW_TAB_PAGE_WITH_OMNIBOX_AS_STARTING_FOCUS:
163 return OmniboxEventProto::
164 INSTANT_NEW_TAB_PAGE_WITH_OMNIBOX_AS_STARTING_FOCUS;
165 case AutocompleteInput::INSTANT_NEW_TAB_PAGE_WITH_FAKEBOX_AS_STARTING_FOCUS:
166 return OmniboxEventProto::
167 INSTANT_NEW_TAB_PAGE_WITH_FAKEBOX_AS_STARTING_FOCUS;
162 } 168 }
163 return OmniboxEventProto::INVALID_SPEC; 169 return OmniboxEventProto::INVALID_SPEC;
164 } 170 }
165 171
166 ProfilerEventProto::TrackedObject::ProcessType AsProtobufProcessType( 172 ProfilerEventProto::TrackedObject::ProcessType AsProtobufProcessType(
167 int process_type) { 173 int process_type) {
168 switch (process_type) { 174 switch (process_type) {
169 case content::PROCESS_TYPE_BROWSER: 175 case content::PROCESS_TYPE_BROWSER:
170 return ProfilerEventProto::TrackedObject::BROWSER; 176 return ProfilerEventProto::TrackedObject::BROWSER;
171 case content::PROCESS_TYPE_RENDERER: 177 case content::PROCESS_TYPE_RENDERER:
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 946
941 paired_device->set_vendor_prefix(vendor_prefix); 947 paired_device->set_vendor_prefix(vendor_prefix);
942 } 948 }
943 949
944 paired_device->set_vendor_id(device->GetVendorID()); 950 paired_device->set_vendor_id(device->GetVendorID());
945 paired_device->set_product_id(device->GetProductID()); 951 paired_device->set_product_id(device->GetProductID());
946 paired_device->set_device_id(device->GetDeviceID()); 952 paired_device->set_device_id(device->GetDeviceID());
947 } 953 }
948 #endif // defined(OS_CHROMEOS) 954 #endif // defined(OS_CHROMEOS)
949 } 955 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698