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

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/environment_data_collection_win.cc

Issue 2776853002: Make UMA_HISTOGRAM_ENUMERATION work with scoped enums. (Closed)
Patch Set: rebase Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/safe_browsing/incident_reporting/environment_data_colle ction_win.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/environment_data_colle ction_win.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 if (module_state->modified_state() == ModuleState::MODULE_STATE_UNMODIFIED) 252 if (module_state->modified_state() == ModuleState::MODULE_STATE_UNMODIFIED)
253 continue; 253 continue;
254 254
255 if (module_state->modified_state() == ModuleState::MODULE_STATE_MODIFIED) { 255 if (module_state->modified_state() == ModuleState::MODULE_STATE_MODIFIED) {
256 UMA_HISTOGRAM_COUNTS_10000( 256 UMA_HISTOGRAM_COUNTS_10000(
257 "ModuleIntegrityVerification.BytesModified.WithoutByteSet", 257 "ModuleIntegrityVerification.BytesModified.WithoutByteSet",
258 num_bytes_different); 258 num_bytes_different);
259 } 259 }
260 260
261 if (!scan_complete) { 261 if (!scan_complete) {
262 UMA_HISTOGRAM_ENUMERATION( 262 UMA_HISTOGRAM_EXACT_LINEAR(
263 "ModuleIntegrityVerification.RelocationsUnordered", i, 263 "ModuleIntegrityVerification.RelocationsUnordered", i,
264 num_modules_to_verify); 264 num_modules_to_verify);
265 } 265 }
266 266
267 process->mutable_module_state()->AddAllocated(module_state.release()); 267 process->mutable_module_state()->AddAllocated(module_state.release());
268 } 268 }
269 #endif // _WIN64 269 #endif // _WIN64
270 } 270 }
271 271
272 void CollectRegistryData( 272 void CollectRegistryData(
(...skipping 29 matching lines...) Expand all
302 CollectModuleVerificationData( 302 CollectModuleVerificationData(
303 kModulesToVerify, arraysize(kModulesToVerify), process); 303 kModulesToVerify, arraysize(kModulesToVerify), process);
304 } 304 }
305 305
306 void CollectPlatformOSData(ClientIncidentReport_EnvironmentData_OS* os_data) { 306 void CollectPlatformOSData(ClientIncidentReport_EnvironmentData_OS* os_data) {
307 CollectRegistryData(kRegKeysToCollect, arraysize(kRegKeysToCollect), 307 CollectRegistryData(kRegKeysToCollect, arraysize(kRegKeysToCollect),
308 os_data->mutable_registry_key()); 308 os_data->mutable_registry_key());
309 CollectDomainEnrollmentData(os_data); 309 CollectDomainEnrollmentData(os_data);
310 } 310 }
311 } // namespace safe_browsing 311 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698