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

Side by Side Diff: chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc

Issue 2705213002: Show different error message if ARC is disabled. (Closed)
Patch Set: Rebase Created 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/arc/auth/arc_manual_auth_code_fetcher.h" 5 #include "chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/chromeos/arc/arc_auth_context.h" 10 #include "chrome/browser/chromeos/arc/arc_auth_context.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 support_host_->ShowError(ArcSupportHost::Error::SIGN_IN_NETWORK_ERROR, 45 support_host_->ShowError(ArcSupportHost::Error::SIGN_IN_NETWORK_ERROR,
46 false); 46 false);
47 return; 47 return;
48 } 48 }
49 49
50 support_host_->ShowLso(); 50 support_host_->ShowLso();
51 } 51 }
52 52
53 void ArcManualAuthCodeFetcher::OnAuthSucceeded(const std::string& auth_code) { 53 void ArcManualAuthCodeFetcher::OnAuthSucceeded(const std::string& auth_code) {
54 DCHECK(!pending_callback_.is_null()); 54 DCHECK(!pending_callback_.is_null());
55 base::ResetAndReturn(&pending_callback_).Run(auth_code); 55 base::ResetAndReturn(&pending_callback_)
56 .Run(ArcAuthInfoFetcher::Status::SUCCESS, auth_code);
56 } 57 }
57 58
58 void ArcManualAuthCodeFetcher::OnAuthFailed() { 59 void ArcManualAuthCodeFetcher::OnAuthFailed() {
59 // Don't report via callback. Extension is already showing more detailed 60 // Don't report via callback. Extension is already showing more detailed
60 // information. Update only UMA here. 61 // information. Update only UMA here.
61 UpdateOptInCancelUMA(OptInCancelReason::NETWORK_ERROR); 62 UpdateOptInCancelUMA(OptInCancelReason::NETWORK_ERROR);
62 } 63 }
63 64
64 void ArcManualAuthCodeFetcher::OnRetryClicked() { 65 void ArcManualAuthCodeFetcher::OnRetryClicked() {
65 DCHECK(!pending_callback_.is_null()); 66 DCHECK(!pending_callback_.is_null());
66 FetchInternal(); 67 FetchInternal();
67 } 68 }
68 69
69 } // namespace arc 70 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698