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

Side by Side Diff: chrome/browser/chromeos/arc/auth/arc_background_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_background_auth_code_fetcher.h" 5 #include "chrome/browser/chromeos/arc/auth/arc_background_auth_code_fetcher.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 void ArcBackgroundAuthCodeFetcher::ResetFetchers() { 176 void ArcBackgroundAuthCodeFetcher::ResetFetchers() {
177 login_token_request_.reset(); 177 login_token_request_.reset();
178 auth_code_fetcher_.reset(); 178 auth_code_fetcher_.reset();
179 } 179 }
180 180
181 void ArcBackgroundAuthCodeFetcher::ReportResult( 181 void ArcBackgroundAuthCodeFetcher::ReportResult(
182 const std::string& auth_code, 182 const std::string& auth_code,
183 OptInSilentAuthCode uma_status) { 183 OptInSilentAuthCode uma_status) {
184 UpdateSilentAuthCodeUMA(uma_status); 184 UpdateSilentAuthCodeUMA(uma_status);
185 base::ResetAndReturn(&callback_).Run(auth_code); 185 base::ResetAndReturn(&callback_)
186 .Run(auth_code.empty() ? ArcAuthInfoFetcher::Status::FAILURE
187 : ArcAuthInfoFetcher::Status::SUCCESS,
188 auth_code);
186 } 189 }
187 190
188 } // namespace arc 191 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698