diff options
author | mikhail.pozdnyakov <mikhail.pozdnyakov@intel.com> | 2016-02-15 02:25:27 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-15 10:26:12 +0000 |
commit | dad8e717e7cad2a61661b48a37e799b008d4800a (patch) | |
tree | 5e2f12e1f0dc45db2929249e903dc9b5850d71c4 /extensions/browser/api | |
parent | 7527d80ff863154e5b088df02253a832211682c2 (diff) | |
download | chromium_src-dad8e717e7cad2a61661b48a37e799b008d4800a.zip chromium_src-dad8e717e7cad2a61661b48a37e799b008d4800a.tar.gz chromium_src-dad8e717e7cad2a61661b48a37e799b008d4800a.tar.bz2 |
[chrome.displaySource] Simplify session error types
This patch reduces amount of possible session error types and
makes them more generic (less WiFi Display oriented).
BUG=242107
Review URL: https://codereview.chromium.org/1689913003
Cr-Commit-Position: refs/heads/master@{#375437}
Diffstat (limited to 'extensions/browser/api')
-rw-r--r-- | extensions/browser/api/display_source/wifi_display/wifi_display_session_service_impl.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/extensions/browser/api/display_source/wifi_display/wifi_display_session_service_impl.cc b/extensions/browser/api/display_source/wifi_display/wifi_display_session_service_impl.cc index 015eca3..08957fe 100644 --- a/extensions/browser/api/display_source/wifi_display/wifi_display_session_service_impl.cc +++ b/extensions/browser/api/display_source/wifi_display/wifi_display_session_service_impl.cc @@ -62,7 +62,7 @@ void WiFiDisplaySessionServiceImpl::Connect(int32_t sink_id, DCHECK(client_); // We support only one Wi-Fi Display session at a time. if (delegate_->connection()) { - client_->OnError(ERROR_TYPE_EXCEEDED_SESSION_LIMIT_ERROR, + client_->OnError(ERROR_TYPE_SESSION_LIMIT_ERROR, kErrorCannotHaveMultipleSessions); return; } @@ -72,8 +72,7 @@ void WiFiDisplaySessionServiceImpl::Connect(int32_t sink_id, sinks.begin(), sinks.end(), [sink_id](DisplaySourceSinkInfoPtr ptr) { return ptr->id == sink_id; }); if (found == sinks.end() || (*found)->state != SINK_STATE_DISCONNECTED) { - client_->OnError(ERROR_TYPE_ESTABLISH_CONNECTION_ERROR, - kErrorSinkNotAvailable); + client_->OnError(ERROR_TYPE_CONNECTION_ERROR, kErrorSinkNotAvailable); return; } AuthenticationInfo auth_info; @@ -182,7 +181,7 @@ void WiFiDisplaySessionServiceImpl::OnConnectFailed( if (sink_id != sink_id_) return; DCHECK(client_); - client_->OnError(ERROR_TYPE_ESTABLISH_CONNECTION_ERROR, message); + client_->OnError(ERROR_TYPE_CONNECTION_ERROR, message); } void WiFiDisplaySessionServiceImpl::OnDisconnectFailed( |