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

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

Issue 162393002: Enable surprise me wallpaper for new profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 8 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 | Annotate | Revision Log
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 WallpaperUtil.saveToStorage(Constants.AccessLocalWallpaperInfoKey, 267 WallpaperUtil.saveToStorage(Constants.AccessLocalWallpaperInfoKey,
268 newValue, false); 268 newValue, false);
269 } 269 }
270 }); 270 });
271 } 271 }
272 }); 272 });
273 273
274 chrome.alarms.onAlarm.addListener(function() { 274 chrome.alarms.onAlarm.addListener(function() {
275 SurpriseWallpaper.getInstance().next(); 275 SurpriseWallpaper.getInstance().next();
276 }); 276 });
277
278 /**
279 * Enables surprise me wallpaper iff it has not already been configured.
280 */
281 chrome.wallpaperPrivate.onRequestEnableSurpriseMe.addListener(function() {
282 Constants.WallpaperSyncStorage.get(Constants.AccessSurpriseMeEnabledKey,
283 function(items) {
284 if (!items.hasOwnProperty(Constants.AccessSurpriseMeEnabledKey)) {
Nikita (slow) 2014/04/08 16:58:27 I wonder if that's the right time to check for thi
Harry McCleave 2014/04/09 02:41:33 My impression was that if this sync fails for what
bshe 2014/04/09 14:32:15 Is this going to be called when an existing user l
285 WallpaperUtil.saveToStorage(Constants.AccessSurpriseMeEnabledKey,
286 true, true);
287 }
288 });
289 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698