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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc

Issue 10970055: Log ChromeToMobile search and auth errors to UMA and INFO. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch to VLOG. Created 8 years, 3 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 | Annotate | Revision Log
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/ui/webui/chromeos/login/enterprise_oauth_enrollment_scr een_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_scr een_handler.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/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 case GoogleServiceAuthError::ACCOUNT_DELETED: 175 case GoogleServiceAuthError::ACCOUNT_DELETED:
176 case GoogleServiceAuthError::ACCOUNT_DISABLED: 176 case GoogleServiceAuthError::ACCOUNT_DISABLED:
177 LOG(ERROR) << "Account error " << error.state(); 177 LOG(ERROR) << "Account error " << error.state();
178 ShowEnrollmentError(ACCOUNT_ERROR); 178 ShowEnrollmentError(ACCOUNT_ERROR);
179 return; 179 return;
180 case GoogleServiceAuthError::CONNECTION_FAILED: 180 case GoogleServiceAuthError::CONNECTION_FAILED:
181 case GoogleServiceAuthError::SERVICE_UNAVAILABLE: 181 case GoogleServiceAuthError::SERVICE_UNAVAILABLE:
182 LOG(WARNING) << "Network error " << error.state(); 182 LOG(WARNING) << "Network error " << error.state();
183 ShowEnrollmentError(NETWORK_ERROR); 183 ShowEnrollmentError(NETWORK_ERROR);
184 return; 184 return;
185 case GoogleServiceAuthError::NUM_STATES:
186 break;
185 } 187 }
186 UMAFailure(policy::kMetricEnrollmentOtherFailed); 188 UMAFailure(policy::kMetricEnrollmentOtherFailed);
187 NOTREACHED(); 189 NOTREACHED();
188 } 190 }
189 191
190 void EnterpriseOAuthEnrollmentScreenHandler::ShowEnrollmentError( 192 void EnterpriseOAuthEnrollmentScreenHandler::ShowEnrollmentError(
191 EnrollmentError error_code) { 193 EnrollmentError error_code) {
192 switch (error_code) { 194 switch (error_code) {
193 case ACCOUNT_ERROR: 195 case ACCOUNT_ERROR:
194 UMAFailure(policy::kMetricEnrollmentNotSupported); 196 UMAFailure(policy::kMetricEnrollmentNotSupported);
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 controller_->OnConfirmationClosed(back_to_signin); 549 controller_->OnConfirmationClosed(back_to_signin);
548 } 550 }
549 551
550 void EnterpriseOAuthEnrollmentScreenHandler::UMAFailure(int sample) { 552 void EnterpriseOAuthEnrollmentScreenHandler::UMAFailure(int sample) {
551 if (is_auto_enrollment_) 553 if (is_auto_enrollment_)
552 sample = policy::kMetricEnrollmentAutoFailed; 554 sample = policy::kMetricEnrollmentAutoFailed;
553 UMA(sample); 555 UMA(sample);
554 } 556 }
555 557
556 } // namespace chromeos 558 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chrome_to_mobile_service.cc ('k') | google_apis/gaia/google_service_auth_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698