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

Side by Side Diff: chrome/browser/chromeos/arc/arc_session_manager.cc

Issue 2705213002: Show different error message if ARC is disabled. (Closed)
Patch Set: Fix browsertests and add a new test for 904 Arc Disabled Created 3 years, 10 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/arc_session_manager.h" 5 #include "chrome/browser/chromeos/arc/arc_session_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/shelf/shelf_delegate.h" 9 #include "ash/common/shelf/shelf_delegate.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 error = ArcSupportHost::Error::SIGN_IN_GMS_NOT_AVAILABLE_ERROR; 342 error = ArcSupportHost::Error::SIGN_IN_GMS_NOT_AVAILABLE_ERROR;
343 break; 343 break;
344 case ProvisioningResult::CLOUD_PROVISION_FLOW_FAILED: 344 case ProvisioningResult::CLOUD_PROVISION_FLOW_FAILED:
345 case ProvisioningResult::CLOUD_PROVISION_FLOW_TIMEOUT: 345 case ProvisioningResult::CLOUD_PROVISION_FLOW_TIMEOUT:
346 case ProvisioningResult::CLOUD_PROVISION_FLOW_INTERNAL_ERROR: 346 case ProvisioningResult::CLOUD_PROVISION_FLOW_INTERNAL_ERROR:
347 error = ArcSupportHost::Error::SIGN_IN_CLOUD_PROVISION_FLOW_FAIL_ERROR; 347 error = ArcSupportHost::Error::SIGN_IN_CLOUD_PROVISION_FLOW_FAIL_ERROR;
348 break; 348 break;
349 case ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR: 349 case ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR:
350 error = ArcSupportHost::Error::SERVER_COMMUNICATION_ERROR; 350 error = ArcSupportHost::Error::SERVER_COMMUNICATION_ERROR;
351 break; 351 break;
352 case ProvisioningResult::ARC_DISABLED:
353 error = ArcSupportHost::Error::ANDROID_MANAGEMENT_REQUIRED_ERROR;
354 break;
352 default: 355 default:
353 error = ArcSupportHost::Error::SIGN_IN_UNKNOWN_ERROR; 356 error = ArcSupportHost::Error::SIGN_IN_UNKNOWN_ERROR;
354 break; 357 break;
355 } 358 }
356 359
357 if (result == ProvisioningResult::ARC_STOPPED || 360 if (result == ProvisioningResult::ARC_STOPPED ||
358 result == ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR) { 361 result == ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR) {
359 if (profile_->GetPrefs()->HasPrefPath(prefs::kArcSignedIn)) 362 if (profile_->GetPrefs()->HasPrefPath(prefs::kArcSignedIn))
360 profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, false); 363 profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, false);
361 ShutdownSession(); 364 ShutdownSession();
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 1011
1009 #undef MAP_STATE 1012 #undef MAP_STATE
1010 1013
1011 // Some compilers report an error even if all values of an enum-class are 1014 // Some compilers report an error even if all values of an enum-class are
1012 // covered exhaustively in a switch statement. 1015 // covered exhaustively in a switch statement.
1013 NOTREACHED() << "Invalid value " << static_cast<int>(state); 1016 NOTREACHED() << "Invalid value " << static_cast<int>(state);
1014 return os; 1017 return os;
1015 } 1018 }
1016 1019
1017 } // namespace arc 1020 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698