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

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

Issue 2531413002: Reset the default value of touch event flag back to "Auto". (Closed)
Patch Set: Wording. Created 4 years 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chrome_browser_main_extra_parts_metrics.h" 5 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 251 }
252 NOTREACHED(); 252 NOTREACHED();
253 return UMA_LINUX_WINDOW_MANAGER_OTHER; 253 return UMA_LINUX_WINDOW_MANAGER_OTHER;
254 } 254 }
255 #endif 255 #endif
256 256
257 void RecordTouchEventState() { 257 void RecordTouchEventState() {
258 const base::CommandLine& command_line = 258 const base::CommandLine& command_line =
259 *base::CommandLine::ForCurrentProcess(); 259 *base::CommandLine::ForCurrentProcess();
260 const std::string touch_enabled_switch = 260 const std::string touch_enabled_switch =
261 command_line.HasSwitch(switches::kTouchEvents) ? 261 command_line.HasSwitch(switches::kTouchEvents)
262 command_line.GetSwitchValueASCII(switches::kTouchEvents) : 262 ? command_line.GetSwitchValueASCII(switches::kTouchEvents)
263 switches::kTouchEventsEnabled; 263 : switches::kTouchEventsAuto;
264 264
265 UMATouchEventsState state; 265 UMATouchEventsState state;
266 if (touch_enabled_switch.empty() || 266 if (touch_enabled_switch.empty() ||
267 touch_enabled_switch == switches::kTouchEventsEnabled || 267 touch_enabled_switch == switches::kTouchEventsEnabled) {
268 touch_enabled_switch == switches::kTouchEventsAuto) {
269 state = UMA_TOUCH_EVENTS_ENABLED; 268 state = UMA_TOUCH_EVENTS_ENABLED;
269 } else if (touch_enabled_switch == switches::kTouchEventsAuto) {
270 state = (ui::GetTouchScreensAvailability() ==
271 ui::TouchScreensAvailability::ENABLED)
272 ? UMA_TOUCH_EVENTS_AUTO_ENABLED
273 : UMA_TOUCH_EVENTS_AUTO_DISABLED;
270 } else if (touch_enabled_switch == switches::kTouchEventsDisabled) { 274 } else if (touch_enabled_switch == switches::kTouchEventsDisabled) {
271 state = UMA_TOUCH_EVENTS_DISABLED; 275 state = UMA_TOUCH_EVENTS_DISABLED;
272 } else { 276 } else {
273 NOTREACHED(); 277 NOTREACHED();
274 return; 278 return;
275 } 279 }
276 280
277 UMA_HISTOGRAM_ENUMERATION("Touchscreen.TouchEventsEnabled", state, 281 UMA_HISTOGRAM_ENUMERATION("Touchscreen.TouchEventsEnabled", state,
278 UMA_TOUCH_EVENTS_STATE_COUNT); 282 UMA_TOUCH_EVENTS_STATE_COUNT);
279 } 283 }
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 } 436 }
433 } 437 }
434 438
435 namespace chrome { 439 namespace chrome {
436 440
437 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { 441 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) {
438 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); 442 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics());
439 } 443 }
440 444
441 } // namespace chrome 445 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698