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

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: 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/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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::NO_NETWORK_CONNECTION: 352 case ProvisioningResult::NO_NETWORK_CONNECTION:
353 // TODO(khmel): Use explicit error for M58+ builds. 353 // TODO(khmel): Use explicit error for M58+ builds.
354 error = ArcSupportHost::Error::SIGN_IN_SERVICE_UNAVAILABLE_ERROR; 354 error = ArcSupportHost::Error::SIGN_IN_SERVICE_UNAVAILABLE_ERROR;
355 break; 355 break;
356 case ProvisioningResult::ARC_DISABLED:
357 error = ArcSupportHost::Error::ANDROID_MANAGEMENT_REQUIRED_ERROR;
358 break;
356 default: 359 default:
357 error = ArcSupportHost::Error::SIGN_IN_UNKNOWN_ERROR; 360 error = ArcSupportHost::Error::SIGN_IN_UNKNOWN_ERROR;
358 break; 361 break;
359 } 362 }
360 363
361 if (result == ProvisioningResult::ARC_STOPPED || 364 if (result == ProvisioningResult::ARC_STOPPED ||
362 result == ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR) { 365 result == ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR) {
363 if (profile_->GetPrefs()->HasPrefPath(prefs::kArcSignedIn)) 366 if (profile_->GetPrefs()->HasPrefPath(prefs::kArcSignedIn))
364 profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, false); 367 profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, false);
365 ShutdownSession(); 368 ShutdownSession();
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 913
911 #undef MAP_STATE 914 #undef MAP_STATE
912 915
913 // Some compilers report an error even if all values of an enum-class are 916 // Some compilers report an error even if all values of an enum-class are
914 // covered exhaustively in a switch statement. 917 // covered exhaustively in a switch statement.
915 NOTREACHED() << "Invalid value " << static_cast<int>(state); 918 NOTREACHED() << "Invalid value " << static_cast<int>(state);
916 return os; 919 return os;
917 } 920 }
918 921
919 } // namespace arc 922 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698