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

Side by Side Diff: chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js

Issue 956403003: Fix the issue that wallpaper changes twice when both "onChanged" and "onAlarm" are fired. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 var WALLPAPER_PICKER_WIDTH = 574; 5 var WALLPAPER_PICKER_WIDTH = 574;
6 var WALLPAPER_PICKER_HEIGHT = 420; 6 var WALLPAPER_PICKER_HEIGHT = 420;
7 7
8 var wallpaperPickerWindow; 8 var wallpaperPickerWindow;
9 9
10 var surpriseWallpaper = null; 10 var surpriseWallpaper = null;
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 WallpaperUtil.setOnlineWallpaper(newValue.url, newValue.layout, 296 WallpaperUtil.setOnlineWallpaper(newValue.url, newValue.layout,
297 function() {}, function() {}); 297 function() {}, function() {});
298 } else if (newValue.source == Constants.WallpaperSourceEnum.Custom) { 298 } else if (newValue.source == Constants.WallpaperSourceEnum.Custom) {
299 WallpaperUtil.setCustomWallpaperFromSyncFS(newValue.url, 299 WallpaperUtil.setCustomWallpaperFromSyncFS(newValue.url,
300 newValue.layout); 300 newValue.layout);
301 } else if (newValue.source == Constants.WallpaperSourceEnum.Default) { 301 } else if (newValue.source == Constants.WallpaperSourceEnum.Default) {
302 chrome.wallpaperPrivate.resetWallpaper(); 302 chrome.wallpaperPrivate.resetWallpaper();
303 } 303 }
304 WallpaperUtil.saveToStorage(Constants.AccessLocalWallpaperInfoKey, 304 WallpaperUtil.saveToStorage(Constants.AccessLocalWallpaperInfoKey,
305 newValue, false); 305 newValue, false);
306 WallpaperUtil.saveToStorage(
307 Constants.AccessLastSurpriseWallpaperChangedDate,
308 dateString, true);
bshe 2015/02/27 19:31:19 dateString seems undefined?
306 } 309 }
307 }); 310 });
308 } 311 }
309 }); 312 });
310 }); 313 });
311 314
312 chrome.alarms.onAlarm.addListener(function() { 315 chrome.alarms.onAlarm.addListener(function() {
313 SurpriseWallpaper.getInstance().next(); 316 SurpriseWallpaper.getInstance().next();
314 }); 317 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698