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

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

Issue 2765523002: arc: Add explicit error message in case network cannot be setup. (Closed)
Patch Set: sort enums 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
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/chromeos/arc/arc_support_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 break; 288 break;
289 case ProvisioningResult::CLOUD_PROVISION_FLOW_FAILED: 289 case ProvisioningResult::CLOUD_PROVISION_FLOW_FAILED:
290 case ProvisioningResult::CLOUD_PROVISION_FLOW_TIMEOUT: 290 case ProvisioningResult::CLOUD_PROVISION_FLOW_TIMEOUT:
291 case ProvisioningResult::CLOUD_PROVISION_FLOW_INTERNAL_ERROR: 291 case ProvisioningResult::CLOUD_PROVISION_FLOW_INTERNAL_ERROR:
292 error = ArcSupportHost::Error::SIGN_IN_CLOUD_PROVISION_FLOW_FAIL_ERROR; 292 error = ArcSupportHost::Error::SIGN_IN_CLOUD_PROVISION_FLOW_FAIL_ERROR;
293 break; 293 break;
294 case ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR: 294 case ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR:
295 error = ArcSupportHost::Error::SERVER_COMMUNICATION_ERROR; 295 error = ArcSupportHost::Error::SERVER_COMMUNICATION_ERROR;
296 break; 296 break;
297 case ProvisioningResult::NO_NETWORK_CONNECTION: 297 case ProvisioningResult::NO_NETWORK_CONNECTION:
298 // TODO(khmel): Use explicit error for M58+ builds. 298 error = ArcSupportHost::Error::NETWORK_UNAVAILABLE_ERROR;
299 error = ArcSupportHost::Error::SIGN_IN_SERVICE_UNAVAILABLE_ERROR;
300 break; 299 break;
301 case ProvisioningResult::ARC_DISABLED: 300 case ProvisioningResult::ARC_DISABLED:
302 error = ArcSupportHost::Error::ANDROID_MANAGEMENT_REQUIRED_ERROR; 301 error = ArcSupportHost::Error::ANDROID_MANAGEMENT_REQUIRED_ERROR;
303 break; 302 break;
304 default: 303 default:
305 error = ArcSupportHost::Error::SIGN_IN_UNKNOWN_ERROR; 304 error = ArcSupportHost::Error::SIGN_IN_UNKNOWN_ERROR;
306 break; 305 break;
307 } 306 }
308 307
309 if (result == ProvisioningResult::ARC_STOPPED || 308 if (result == ProvisioningResult::ARC_STOPPED ||
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 973
975 #undef MAP_STATE 974 #undef MAP_STATE
976 975
977 // Some compilers report an error even if all values of an enum-class are 976 // Some compilers report an error even if all values of an enum-class are
978 // covered exhaustively in a switch statement. 977 // covered exhaustively in a switch statement.
979 NOTREACHED() << "Invalid value " << static_cast<int>(state); 978 NOTREACHED() << "Invalid value " << static_cast<int>(state);
980 return os; 979 return os;
981 } 980 }
982 981
983 } // namespace arc 982 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/chromeos/arc/arc_support_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698