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

Issue 956403003: Fix the issue that wallpaper changes twice when both "onChanged" and "onAlarm" are fired. (Closed)

Created:
5 years, 10 months ago by xdai1
Modified:
5 years, 9 months ago
Reviewers:
bshe
CC:
chromium-reviews, stevenjb+watch_chromium.org, arv+watch_chromium.org, oshima+watch_chromium.org, nkostylev+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix the issue that wallpaper changes twice when both "onChanged" and "onAlarm" are fired. Suppose we have two Chromebook A and B with the same account and with surprise me enabled. This CL handles two edge cases when "onChanged" and "onAlarm" are both fired on Chromebook B. 1) The last surprise wallpaper was set on A yesterday. Log into B today: Don't sync with A. A new surprise wallpaper should set for B. 2) The last surprise wallpaper was set on A today. Log into B later the same day: Don't set a surprise wallpaper for B anymore, instead B should sync the same wallpaper with A. BUG=373682 TEST=Tested on devices Committed: https://crrev.com/4a36585c7c380782e999a259c74edd6c06fea793 Cr-Commit-Position: refs/heads/master@{#320119}

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Total comments: 15

Patch Set 3 : Address the code review comments. #

Patch Set 4 : Address the code review comments. #

Patch Set 5 : Address the code review comments. #

Patch Set 6 : Address the code review comments. #

Total comments: 6

Patch Set 7 : Address the multiple trigger of onAlarm() issue. #

Patch Set 8 : Fix the failed wallpaper sync test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -37 lines) Patch
M chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js View 1 2 3 4 5 6 5 chunks +72 lines, -35 lines 0 comments Download
M chrome/browser/resources/chromeos/wallpaper_manager/js/util.js View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/chromeos/wallpaper_manager/unit_tests/api_mock.js View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (4 generated)
xdai1
Biao, could you review the CL please? thanks!
5 years, 9 months ago (2015-02-27 17:19:41 UTC) #2
bshe
Interesting case. What if the alarm fired first then the sync envoked. We should also ...
5 years, 9 months ago (2015-02-27 19:31:19 UTC) #3
xdai1
On 2015/02/27 19:31:19, bshe wrote: > Interesting case. What if the alarm fired first then ...
5 years, 9 months ago (2015-03-04 01:52:11 UTC) #4
bshe
So this CL wont take care of the case that onAlarm fires first then sync ...
5 years, 9 months ago (2015-03-04 19:45:40 UTC) #5
xdai1
It does take care of the case that onAlarm fires first (since in the two ...
5 years, 9 months ago (2015-03-04 20:53:17 UTC) #6
xdai1
Biao, please take another look, thanks! I've tested on my devices, and it works as ...
5 years, 9 months ago (2015-03-04 21:32:39 UTC) #7
bshe
> It does take care of the case that onAlarm fires first (since in the ...
5 years, 9 months ago (2015-03-05 14:53:20 UTC) #8
bshe
On 2015/03/04 21:32:39, xdai1 wrote: > Biao, please take another look, thanks! I've tested on ...
5 years, 9 months ago (2015-03-05 14:57:24 UTC) #9
xdai1
On 2015/03/05 14:53:20, bshe wrote: > > It does take care of the case that ...
5 years, 9 months ago (2015-03-05 18:08:23 UTC) #10
xdai1
Biao, please take another look at the CL, thanks! Also addressed the multiple trigger of ...
5 years, 9 months ago (2015-03-06 01:41:27 UTC) #11
bshe
https://codereview.chromium.org/956403003/diff/100001/chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js File chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js (right): https://codereview.chromium.org/956403003/diff/100001/chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js#newcode35 chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js:35: var onNotFound = function() { If not found, I ...
5 years, 9 months ago (2015-03-09 14:16:09 UTC) #12
xdai1
Biao, thanks for the review. Please take another look, thanks! https://codereview.chromium.org/956403003/diff/100001/chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js File chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js (right): https://codereview.chromium.org/956403003/diff/100001/chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js#newcode35 ...
5 years, 9 months ago (2015-03-09 21:07:10 UTC) #14
bshe
On 2015/03/09 21:07:10, xdai1 wrote: > Biao, thanks for the review. Please take another look, ...
5 years, 9 months ago (2015-03-10 18:19:21 UTC) #15
xdai1
On 2015/03/10 18:19:21, bshe wrote: > On 2015/03/09 21:07:10, xdai1 wrote: > > Biao, thanks ...
5 years, 9 months ago (2015-03-10 18:59:40 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/956403003/160001
5 years, 9 months ago (2015-03-11 18:10:02 UTC) #19
commit-bot: I haz the power
Committed patchset #8 (id:160001)
5 years, 9 months ago (2015-03-11 19:44:40 UTC) #20
commit-bot: I haz the power
5 years, 9 months ago (2015-03-11 19:45:18 UTC) #21
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/4a36585c7c380782e999a259c74edd6c06fea793
Cr-Commit-Position: refs/heads/master@{#320119}

Powered by Google App Engine
This is Rietveld 408576698