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

Unified Diff: remoting/webapp/crd/js/remoting.js

Issue 848993002: Improve apps v2 upgrade UX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor + UT Created 5 years, 11 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: remoting/webapp/crd/js/remoting.js
diff --git a/remoting/webapp/crd/js/remoting.js b/remoting/webapp/crd/js/remoting.js
index f80d9f064944d4708090450e080084fbdf45b037..ba07e04ff2227519feb8d51c3e4d89821584a500 100644
--- a/remoting/webapp/crd/js/remoting.js
+++ b/remoting/webapp/crd/js/remoting.js
@@ -21,8 +21,6 @@ remoting.initGlobalObjects = function() {
if (base.isAppsV2()) {
var htmlNode = /** @type {HTMLElement} */ (document.body.parentNode);
htmlNode.classList.add('apps-v2');
- } else {
- migrateLocalToChromeStorage_();
Jamie 2015/01/20 22:32:01 I don't think this code needs to be removed. It's
kelvinp 2015/01/21 21:16:21 I think it is a good practice to clean up dead cod
}
console.log(remoting.getExtensionInfo());
@@ -231,26 +229,3 @@ function isWindowed_(callback) {
}
}
-/**
- * Migrate settings in window.localStorage to chrome.storage.local so that
- * users of older web-apps that used the former do not lose their settings.
- */
-function migrateLocalToChromeStorage_() {
- // The OAuth2 class still uses window.localStorage, so don't migrate any of
- // those settings.
- var oauthSettings = [
- 'oauth2-refresh-token',
- 'oauth2-refresh-token-revokable',
- 'oauth2-access-token',
- 'oauth2-xsrf-token',
- 'remoting-email'
- ];
- for (var setting in window.localStorage) {
- if (oauthSettings.indexOf(setting) == -1) {
- var copy = {}
- copy[setting] = window.localStorage.getItem(setting);
- chrome.storage.local.set(copy);
- window.localStorage.removeItem(setting);
- }
- }
-}

Powered by Google App Engine
This is Rietveld 408576698