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

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

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 case ui::WM_WMII: 189 case ui::WM_WMII:
190 return UMA_LINUX_WINDOW_MANAGER_WMII; 190 return UMA_LINUX_WINDOW_MANAGER_WMII;
191 case ui::WM_XFWM4: 191 case ui::WM_XFWM4:
192 return UMA_LINUX_WINDOW_MANAGER_XFWM4; 192 return UMA_LINUX_WINDOW_MANAGER_XFWM4;
193 } 193 }
194 return UMA_LINUX_WINDOW_MANAGER_OTHER; 194 return UMA_LINUX_WINDOW_MANAGER_OTHER;
195 } 195 }
196 #endif 196 #endif
197 197
198 void RecordTouchEventState() { 198 void RecordTouchEventState() {
199 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 199 const base::CommandLine& command_line =
200 *base::CommandLine::ForCurrentProcess();
200 const std::string touch_enabled_switch = 201 const std::string touch_enabled_switch =
201 command_line.HasSwitch(switches::kTouchEvents) ? 202 command_line.HasSwitch(switches::kTouchEvents) ?
202 command_line.GetSwitchValueASCII(switches::kTouchEvents) : 203 command_line.GetSwitchValueASCII(switches::kTouchEvents) :
203 switches::kTouchEventsAuto; 204 switches::kTouchEventsAuto;
204 205
205 UMATouchEventsState state; 206 UMATouchEventsState state;
206 if (touch_enabled_switch.empty() || 207 if (touch_enabled_switch.empty() ||
207 touch_enabled_switch == switches::kTouchEventsEnabled) { 208 touch_enabled_switch == switches::kTouchEventsEnabled) {
208 state = UMA_TOUCH_EVENTS_ENABLED; 209 state = UMA_TOUCH_EVENTS_ENABLED;
209 } else if (touch_enabled_switch == switches::kTouchEventsAuto) { 210 } else if (touch_enabled_switch == switches::kTouchEventsAuto) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 302 }
302 } 303 }
303 304
304 namespace chrome { 305 namespace chrome {
305 306
306 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { 307 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) {
307 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); 308 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics());
308 } 309 }
309 310
310 } // namespace chrome 311 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698