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

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

Issue 2554743003: arc: Fix double provisioning failure reporting. (Closed)
Patch Set: 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
« no previous file with comments | « chrome/browser/chromeos/arc/arc_session_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 31595541115c22fa6f4ec32dd325f565805f6fdf..bcaa3cb58376a59da3c07a26c80b33ba15f4ccae 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager.cc
@@ -194,6 +194,7 @@ void ArcSessionManager::OnBridgeStopped(ArcBridgeService::StopReason reason) {
if (arc_sign_in_timer_.IsRunning()) {
OnProvisioningFinished(ProvisioningResult::ARC_STOPPED);
}
+ provisioning_error_reported_ = false;
Luis Héctor Chávez 2016/12/06 17:35:20 Is this one needed? Shouldn't we just use the one
khmel 2016/12/06 17:46:55 Actually not, more paranoiac...
if (clear_required_) {
// This should be always true, but just in case as this is looked at
@@ -248,6 +249,15 @@ void ArcSessionManager::OnProvisioningFinished(ProvisioningResult result) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK_EQ(state_, State::ACTIVE);
+ if (result != ProvisioningResult::SUCCESS) {
hidehiko 2016/12/06 18:10:53 Per offline discussion, we want to guarantee OnPro
khmel 2016/12/06 18:13:35 Per our discussion I thought that we want to have
hidehiko 2016/12/06 18:15:54 I meant, it is not needed to check if result is SU
khmel 2016/12/06 18:41:13 Got you! However LOG(WARNING) sounds better becaus
+ if (provisioning_error_reported_) {
+ LOG(WARNING) << " Provisioning error was already reported. Ignoring "
+ << " additional error " << static_cast<int>(result) << ".";
+ return;
+ }
+ provisioning_error_reported_ = true;
+ }
+
if (result == ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR) {
if (IsArcKioskMode()) {
VLOG(1) << "Robot account auth code fetching error";
@@ -591,6 +601,7 @@ void ArcSessionManager::StopAndEnableArc() {
void ArcSessionManager::StartArc() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+ provisioning_error_reported_ = false;
arc_bridge_service()->RequestStart();
SetState(State::ACTIVE);
}
« no previous file with comments | « chrome/browser/chromeos/arc/arc_session_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698