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

Unified Diff: third_party/polymer/v1_0/components-chromium/iron-localstorage/iron-localstorage-extracted.js

Issue 1187823002: Update Polymer components and re-run reproduce.sh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/v1_0/components-chromium/iron-localstorage/iron-localstorage-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-localstorage/iron-localstorage-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-localstorage/iron-localstorage-extracted.js
index 86b5c506f67360bd1cb1509739043bafac262546..baf6df922bbe9de3da741765a859b9cf86f29a14 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-localstorage/iron-localstorage-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-localstorage/iron-localstorage-extracted.js
@@ -6,9 +6,9 @@
/**
* Fired when value loads from localStorage.
*
- * @param {Object} detail
- * @param {Boolean} detail.externalChange true if change occured in different window
- * @event iron-localstorage-load
+ * @event paper-responsive-change
+ * @param {{externalChange: boolean}} detail -
+ * externalChange: True if change occured in different window.
*/
/**
@@ -28,6 +28,7 @@
/**
* The data associated with this storage.
* If value is set to null, and storage is in useRaw mode, item will be deleted
+ * @type {*}
*/
value: {
type: Object,
@@ -109,10 +110,10 @@
/**
* loads value from local storage
- * @param {Boolean} externalChange true if loading changes from a different window
+ * @param {boolean=} externalChange true if loading changes from a different window
*/
_load: function(externalChange) {
- var v = localStorage.getItem(this.name);
+ var v = window.localStorage.getItem(this.name);
if (v === null) {
this.fire('iron-localstorage-load-empty');
@@ -139,9 +140,9 @@
var v = this.useRaw ? this.value : JSON.stringify(this.value);
try {
if (this.value === null) {
- localStorage.removeItem(this.name);
+ window.localStorage.removeItem(this.name);
} else {
- localStorage.setItem(this.name, v);
+ window.localStorage.setItem(this.name, /** @type {string} */ (v));
}
}
catch(ex) {

Powered by Google App Engine
This is Rietveld 408576698