diff options
author | jamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-25 23:46:46 +0000 |
---|---|---|
committer | jamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-25 23:46:46 +0000 |
commit | 23e4353dfe2483dcfc7511bf2b23643fbdc5a949 (patch) | |
tree | 10a60918d09269d958da529185e920ee6cb6bce6 /remoting/webapp/main.html | |
parent | e335fd5150fc614e1b9df1d9e7e93ec7793d26f7 (diff) | |
download | chromium_src-23e4353dfe2483dcfc7511bf2b23643fbdc5a949.zip chromium_src-23e4353dfe2483dcfc7511bf2b23643fbdc5a949.tar.gz chromium_src-23e4353dfe2483dcfc7511bf2b23643fbdc5a949.tar.bz2 |
Pass OAuth token refresh errors back to the caller.
This allows the app to advise the user to sign back in to Chromoting only when
we believe it will actually help. As a bonus, the unhelpfully-named
ERROR_GENERIC is now gone--apart from OAuth refresh failures, it was being used
for edge-cases where we don't expect anything to go wrong (these now use the
more suitably-named ERROR_UNEXPECTED).
As part of fixing this, I have cleaned up some OAuth call points that were
written before callWithToken existed, and which weren't using it.
BUG=122899,130794
TEST=Corrupt the oauth2-refresh-token value in HTML Local Storage
Review URL: https://chromiumcodereview.appspot.com/10579012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144059 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/webapp/main.html')
-rw-r--r-- | remoting/webapp/main.html | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/remoting/webapp/main.html b/remoting/webapp/main.html index 17a338c..a47b80e 100644 --- a/remoting/webapp/main.html +++ b/remoting/webapp/main.html @@ -140,7 +140,12 @@ found in the LICENSE file. </div> <div id="me2me-content"> <div id="host-list" hidden></div> - <div id="host-list-error" class="error-state" hidden></div> + <div id="host-list-error" class="box" hidden> + <div id="host-list-error-message" class="error-state"></div> + <div class="box-spacer"></div> + <button type="button" + id="host-list-refresh-failed-button"></button> + </div> <div id="daemon-control" data-daemon-state="enabled disabled" hidden> <div class="section-row no-non-local-hosts" data-daemon-state="disabled"> @@ -182,15 +187,34 @@ found in the LICENSE file. </div> <!-- home --> <div id="dialog-screen" - data-ui-mode="home.host home.client home.auth home.history home.confirm-host-delete home.host-setup" + data-ui-mode="home.host home.client home.auth home.history home.confirm-host-delete home.host-setup home.token-refresh-failed" hidden></div> <div id="dialog-container" - data-ui-mode="home.host home.client home.auth home.history home.confirm-host-delete home.host-setup" + data-ui-mode="home.host home.client home.auth home.history home.confirm-host-delete home.host-setup home.token-refresh-failed" hidden> <div class="box-spacer"></div> + <!-- TODO(jamiewalch): Refactor the various error-state divs --> + <div class="kd-modaldialog" data-ui-mode="home.token-refresh-failed"> + <div class="message"> + <span id="token-refresh-error-message" class="error-state"></span> + </div> + <div id="token-refresh-auth-failed" class="box"> + <div class="box-spacer"></div> + <button id="token-refresh-error-sign-in" + type="button" + i18n-content="SIGN_IN_BUTTON"></button> + </div> + <div id="token-refresh-other-error" class="box"> + <div class="box-spacer"></div> + <button id="token-refresh-error-ok" + type="button" + i18n-content="OK"></button> + </div> + </div> <!-- home.token-refresh-failed --> + <div id="host-setup-dialog" class="kd-modaldialog" data-ui-mode="home.host-setup"> |