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

Unified Diff: chrome/browser/chromeos/arc/arc_session_manager.cc

Issue 2547073002: Fix race issue in ArcAuthService. (Closed)
Patch Set: Address comments Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/arc_session_manager.cc
diff --git a/chrome/browser/chromeos/arc/arc_session_manager.cc b/chrome/browser/chromeos/arc/arc_session_manager.cc
index 2be4bdc26e5af6b124e6df5010c8ba1920421e2a..ed2b3e8744c38fe7c4a690d551cedfc336cd8fd9 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager.cc
@@ -14,11 +14,9 @@
#include "base/logging.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
-#include "chrome/browser/chromeos/arc/arc_auth_code_fetcher.h"
#include "chrome/browser/chromeos/arc/arc_auth_context.h"
#include "chrome/browser/chromeos/arc/arc_optin_uma.h"
#include "chrome/browser/chromeos/arc/arc_support_host.h"
-#include "chrome/browser/chromeos/arc/auth/arc_robot_auth.h"
#include "chrome/browser/chromeos/arc/optin/arc_terms_of_service_negotiator.h"
#include "chrome/browser/chromeos/arc/policy/arc_android_management_checker.h"
#include "chrome/browser/chromeos/arc/policy/arc_policy_util.h"
@@ -242,6 +240,14 @@ void ArcSessionManager::OnProvisioningFinished(ProvisioningResult result) {
DCHECK_EQ(state_, State::ACTIVE);
if (result == ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR) {
+ if (IsArcKioskMode()) {
+ VLOG(1) << "Robot account auth code fetching error";
+ // Log out the user. All the cleanup will be done in Shutdown() method.
+ // The callback is not called because auth code is empty.
+ chrome::AttemptUserExit();
+ return;
+ }
+
// For backwards compatibility, use NETWORK_ERROR for
// CHROME_SERVER_COMMUNICATION_ERROR case.
UpdateOptInCancelUMA(OptInCancelReason::NETWORK_ERROR);
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_service.cc ('k') | chrome/browser/chromeos/arc/auth/arc_auth_code_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698