| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * OAuth2 class that handles retrieval/storage of an OAuth2 token. | 7 * OAuth2 class that handles retrieval/storage of an OAuth2 token. |
| 8 * | 8 * |
| 9 * Uses a content script to trampoline the OAuth redirect page back into the | 9 * Uses a content script to trampoline the OAuth redirect page back into the |
| 10 * extension context. This works around the lack of native support for | 10 * extension context. This works around the lack of native support for |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 * @return {?string} The email address, if it has been cached by a previous call | 339 * @return {?string} The email address, if it has been cached by a previous call |
| 340 * to getEmail, otherwise null. | 340 * to getEmail, otherwise null. |
| 341 */ | 341 */ |
| 342 remoting.OAuth2.prototype.getCachedEmail = function() { | 342 remoting.OAuth2.prototype.getCachedEmail = function() { |
| 343 var value = window.localStorage.getItem(this.KEY_EMAIL_); | 343 var value = window.localStorage.getItem(this.KEY_EMAIL_); |
| 344 if (typeof value == 'string') { | 344 if (typeof value == 'string') { |
| 345 return value; | 345 return value; |
| 346 } | 346 } |
| 347 return null; | 347 return null; |
| 348 }; | 348 }; |
| OLD | NEW |