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

Side by Side Diff: ios/chrome/browser/physical_web/physical_web_initial_state_recorder.mm

Issue 2886933003: Use stricter type checking in UMA_HISTOGRAM_ENUMERATION (Closed)
Patch Set: simplify type checking Created 3 years, 5 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #import "ios/chrome/browser/physical_web/physical_web_initial_state_recorder.h" 5 #import "ios/chrome/browser/physical_web/physical_web_initial_state_recorder.h"
6 6
7 #import <CoreBluetooth/CoreBluetooth.h> 7 #import <CoreBluetooth/CoreBluetooth.h>
8 #import <CoreLocation/CoreLocation.h> 8 #import <CoreLocation/CoreLocation.h>
9 9
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 state |= LOCATION_SERVICES_FLAG; 158 state |= LOCATION_SERVICES_FLAG;
159 } 159 }
160 if (locationAuthorized) { 160 if (locationAuthorized) {
161 state |= LOCATION_AUTHORIZED_FLAG; 161 state |= LOCATION_AUTHORIZED_FLAG;
162 } 162 }
163 if (bluetoothEnabled) { 163 if (bluetoothEnabled) {
164 state |= BLUETOOTH_FLAG; 164 state |= BLUETOOTH_FLAG;
165 } 165 }
166 166
167 DCHECK(state < PHYSICAL_WEB_INITIAL_STATE_COUNT); 167 DCHECK(state < PHYSICAL_WEB_INITIAL_STATE_COUNT);
168 UMA_HISTOGRAM_ENUMERATION("PhysicalWeb.InitialState.IosChrome", state, 168 UMA_HISTOGRAM_ENUMERATION(
169 PHYSICAL_WEB_INITIAL_STATE_COUNT); 169 "PhysicalWeb.InitialState.IosChrome",
170 static_cast<PhysicalWebInitialStateIosChrome>(state),
171 PHYSICAL_WEB_INITIAL_STATE_COUNT);
170 } 172 }
171 173
172 @end 174 @end
OLDNEW
« no previous file with comments | « content/renderer/input/render_widget_input_handler.cc ('k') | ios/chrome/browser/ui/browser_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698