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

Side by Side Diff: chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc

Issue 2640843002: Chromad: Disable device attribute update after enrollment (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chromeos/login/enrollment/enterprise_enrollment_helper_ impl.h" 5 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_ impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 policy::DeviceCloudPolicyInitializer* dcp_initializer = 162 policy::DeviceCloudPolicyInitializer* dcp_initializer =
163 connector->GetDeviceCloudPolicyInitializer(); 163 connector->GetDeviceCloudPolicyInitializer();
164 CHECK(dcp_initializer); 164 CHECK(dcp_initializer);
165 dcp_initializer->StartEnrollment( 165 dcp_initializer->StartEnrollment(
166 connector->device_management_service(), enrollment_config_, token, 166 connector->device_management_service(), enrollment_config_, token,
167 base::Bind(&EnterpriseEnrollmentHelperImpl::OnEnrollmentFinished, 167 base::Bind(&EnterpriseEnrollmentHelperImpl::OnEnrollmentFinished,
168 weak_ptr_factory_.GetWeakPtr())); 168 weak_ptr_factory_.GetWeakPtr()));
169 } 169 }
170 170
171 void EnterpriseEnrollmentHelperImpl::GetDeviceAttributeUpdatePermission() { 171 void EnterpriseEnrollmentHelperImpl::GetDeviceAttributeUpdatePermission() {
172 // Don't update device attributes for Active Directory management.
173 if (!enrollment_config_.management_realm.empty()) {
174 OnDeviceAttributeUpdatePermission(false);
175 return;
176 }
177
172 // TODO(pbond): remove this LOG once http://crbug.com/586961 is fixed. 178 // TODO(pbond): remove this LOG once http://crbug.com/586961 is fixed.
achuithb 2017/01/18 19:19:24 Could you please remove this comment and log state
173 LOG(WARNING) << "Get device attribute update permission"; 179 LOG(WARNING) << "Get device attribute update permission";
174 policy::BrowserPolicyConnectorChromeOS* connector = 180 policy::BrowserPolicyConnectorChromeOS* connector =
175 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 181 g_browser_process->platform_part()->browser_policy_connector_chromeos();
176 policy::DeviceCloudPolicyManagerChromeOS* policy_manager = 182 policy::DeviceCloudPolicyManagerChromeOS* policy_manager =
177 connector->GetDeviceCloudPolicyManager(); 183 connector->GetDeviceCloudPolicyManager();
178 policy::CloudPolicyClient* client = policy_manager->core()->client(); 184 policy::CloudPolicyClient* client = policy_manager->core()->client();
179 185
180 client->GetDeviceAttributeUpdatePermission( 186 client->GetDeviceAttributeUpdatePermission(
181 oauth_token_, 187 oauth_token_,
182 base::Bind( 188 base::Bind(
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 EnrollmentUMA(sample, enrollment_config_.mode); 434 EnrollmentUMA(sample, enrollment_config_.mode);
429 } 435 }
430 436
431 void EnterpriseEnrollmentHelperImpl::OnSigninProfileCleared( 437 void EnterpriseEnrollmentHelperImpl::OnSigninProfileCleared(
432 const base::Closure& callback) { 438 const base::Closure& callback) {
433 oauth_data_cleared_ = true; 439 oauth_data_cleared_ = true;
434 callback.Run(); 440 callback.Run();
435 } 441 }
436 442
437 } // namespace chromeos 443 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698