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

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

Issue 2581353002: Use the Windows MDM API to check if the machine is being managed. (Closed)
Patch Set: rebased Created 3 years, 10 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 rootkey_name += L"\\"; 285 rootkey_name += L"\\";
286 rootkey_name += key_info.subkey; 286 rootkey_name += key_info.subkey;
287 regkey_pb->set_name(base::WideToUTF8(rootkey_name)); 287 regkey_pb->set_name(base::WideToUTF8(rootkey_name));
288 CollectRegistryDataForKey(reg_key, regkey_pb); 288 CollectRegistryDataForKey(reg_key, regkey_pb);
289 } 289 }
290 } 290 }
291 } 291 }
292 292
293 void CollectDomainEnrollmentData( 293 void CollectDomainEnrollmentData(
294 ClientIncidentReport_EnvironmentData_OS* os_data) { 294 ClientIncidentReport_EnvironmentData_OS* os_data) {
295 os_data->set_is_enrolled_to_domain(base::win::IsEnrolledToDomain()); 295 os_data->set_is_enrolled_to_domain(base::win::IsEnterpriseManaged());
296 } 296 }
297 297
298 void CollectPlatformProcessData( 298 void CollectPlatformProcessData(
299 ClientIncidentReport_EnvironmentData_Process* process) { 299 ClientIncidentReport_EnvironmentData_Process* process) {
300 CollectDlls(process); 300 CollectDlls(process);
301 RecordLspFeature(process); 301 RecordLspFeature(process);
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