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

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

Issue 12538009: Public Sessions: fetch device robot api token during enterprise enrollment. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_screen. h" 5 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen. h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 NotifyTestingObservers(success); 220 NotifyTestingObservers(success);
221 221
222 switch (status.status()) { 222 switch (status.status()) {
223 case policy::EnrollmentStatus::STATUS_SUCCESS: 223 case policy::EnrollmentStatus::STATUS_SUCCESS:
224 WizardController::MarkDeviceRegistered(); 224 WizardController::MarkDeviceRegistered();
225 UMA(is_auto_enrollment_ ? policy::kMetricEnrollmentAutoOK 225 UMA(is_auto_enrollment_ ? policy::kMetricEnrollmentAutoOK
226 : policy::kMetricEnrollmentOK); 226 : policy::kMetricEnrollmentOK);
227 return; 227 return;
228 case policy::EnrollmentStatus::STATUS_REGISTRATION_FAILED: 228 case policy::EnrollmentStatus::STATUS_REGISTRATION_FAILED:
229 case policy::EnrollmentStatus::STATUS_POLICY_FETCH_FAILED: 229 case policy::EnrollmentStatus::STATUS_POLICY_FETCH_FAILED:
230 case policy::EnrollmentStatus::STATUS_ROBOT_AUTH_FETCH_FAILED:
230 switch (status.client_status()) { 231 switch (status.client_status()) {
231 case policy::DM_STATUS_SUCCESS: 232 case policy::DM_STATUS_SUCCESS:
232 case policy::DM_STATUS_REQUEST_INVALID: 233 case policy::DM_STATUS_REQUEST_INVALID:
233 case policy::DM_STATUS_SERVICE_DEVICE_NOT_FOUND: 234 case policy::DM_STATUS_SERVICE_DEVICE_NOT_FOUND:
234 case policy::DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID: 235 case policy::DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID:
235 case policy::DM_STATUS_SERVICE_ACTIVATION_PENDING: 236 case policy::DM_STATUS_SERVICE_ACTIVATION_PENDING:
236 case policy::DM_STATUS_SERVICE_DEVICE_ID_CONFLICT: 237 case policy::DM_STATUS_SERVICE_DEVICE_ID_CONFLICT:
237 case policy::DM_STATUS_SERVICE_POLICY_NOT_FOUND: 238 case policy::DM_STATUS_SERVICE_POLICY_NOT_FOUND:
238 UMAFailure(policy::kMetricEnrollmentOtherFailed); 239 UMAFailure(policy::kMetricEnrollmentOtherFailed);
239 return; 240 return;
(...skipping 10 matching lines...) Expand all
250 UMAFailure(policy::kMetricEnrollmentInvalidSerialNumber); 251 UMAFailure(policy::kMetricEnrollmentInvalidSerialNumber);
251 return; 252 return;
252 case policy::DM_STATUS_SERVICE_MISSING_LICENSES: 253 case policy::DM_STATUS_SERVICE_MISSING_LICENSES:
253 UMAFailure(policy::kMetricMissingLicensesError); 254 UMAFailure(policy::kMetricMissingLicensesError);
254 return; 255 return;
255 } 256 }
256 break; 257 break;
257 case policy::EnrollmentStatus::STATUS_REGISTRATION_BAD_MODE: 258 case policy::EnrollmentStatus::STATUS_REGISTRATION_BAD_MODE:
258 UMAFailure(policy::kMetricEnrollmentInvalidEnrollmentMode); 259 UMAFailure(policy::kMetricEnrollmentInvalidEnrollmentMode);
259 return; 260 return;
261 case policy::EnrollmentStatus::STATUS_ROBOT_REFRESH_FETCH_FAILED:
262 UMAFailure(policy::kMetricEnrollmentOtherFailed);
Mattias Nissler (ping if slow) 2013/03/19 06:33:08 If this should really use the same UMA code (which
David Roche 2013/04/02 01:59:25 Added unique UMA code.
263 return;
260 case policy::EnrollmentStatus::STATUS_LOCK_TIMEOUT: 264 case policy::EnrollmentStatus::STATUS_LOCK_TIMEOUT:
261 UMAFailure(policy::kMetricLockboxTimeoutError); 265 UMAFailure(policy::kMetricLockboxTimeoutError);
262 return; 266 return;
263 case policy::EnrollmentStatus::STATUS_LOCK_WRONG_USER: 267 case policy::EnrollmentStatus::STATUS_LOCK_WRONG_USER:
264 UMAFailure(policy::kMetricEnrollmentWrongUserError); 268 UMAFailure(policy::kMetricEnrollmentWrongUserError);
265 return; 269 return;
266 case policy::EnrollmentStatus::STATUS_VALIDATION_FAILED: 270 case policy::EnrollmentStatus::STATUS_VALIDATION_FAILED:
267 case policy::EnrollmentStatus::STATUS_STORE_ERROR: 271 case policy::EnrollmentStatus::STATUS_STORE_ERROR:
268 case policy::EnrollmentStatus::STATUS_LOCK_ERROR: 272 case policy::EnrollmentStatus::STATUS_LOCK_ERROR:
269 UMAFailure(policy::kMetricEnrollmentOtherFailed); 273 UMAFailure(policy::kMetricEnrollmentOtherFailed);
(...skipping 14 matching lines...) Expand all
284 actor_->Show(); 288 actor_->Show();
285 actor_->ShowSigninScreen(); 289 actor_->ShowSigninScreen();
286 } 290 }
287 291
288 void EnterpriseEnrollmentScreen::NotifyTestingObservers(bool succeeded) { 292 void EnterpriseEnrollmentScreen::NotifyTestingObservers(bool succeeded) {
289 FOR_EACH_OBSERVER(TestingObserver, observers_, 293 FOR_EACH_OBSERVER(TestingObserver, observers_,
290 OnEnrollmentComplete(succeeded)); 294 OnEnrollmentComplete(succeeded));
291 } 295 }
292 296
293 } // namespace chromeos 297 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698