|
|
Created:
6 years, 9 months ago by robliao Modified:
6 years, 9 months ago CC:
chromium-reviews, arv+watch_chromium.org Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionRefactor Chrome Now Card Dismissal Stack to use Promises
BUG=164227
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257025
Patch Set 1 #
Total comments: 8
Patch Set 2 : CR Feedback #Patch Set 3 : CR Feedback #Messages
Total messages: 19 (0 generated)
https://codereview.chromium.org/183883027/diff/1/chrome/browser/resources/goo... File chrome/browser/resources/google_now/background.js (right): https://codereview.chromium.org/183883027/diff/1/chrome/browser/resources/goo... chrome/browser/resources/google_now/background.js:653: processPendingDismissals().then(function() { does .then(requestNotificationCards) work? https://codereview.chromium.org/183883027/diff/1/chrome/browser/resources/goo... chrome/browser/resources/google_now/background.js:717: return fillFromChromeLocalStorage({ general comment on this pattern: this does make sense but a return statement covering almost 50 lines was a little confusing on first read. Maybe cache in a local? I'll defer to a second opinion though.
https://codereview.chromium.org/183883027/diff/1/chrome/browser/resources/goo... File chrome/browser/resources/google_now/background.js (right): https://codereview.chromium.org/183883027/diff/1/chrome/browser/resources/goo... chrome/browser/resources/google_now/background.js:653: processPendingDismissals().then(function() { Yup! That should work. On 2014/03/07 01:57:51, Travis Skare wrote: > does > .then(requestNotificationCards) > work? https://codereview.chromium.org/183883027/diff/1/chrome/browser/resources/goo... chrome/browser/resources/google_now/background.js:717: return fillFromChromeLocalStorage({ Would we do the same if we were returning a very long function? On 2014/03/07 01:57:51, Travis Skare wrote: > general comment on this pattern: this does make sense but a return statement > covering almost 50 lines was a little confusing on first read. Maybe cache in a > local? > > I'll defer to a second opinion though.
lgtm https://codereview.chromium.org/183883027/diff/1/chrome/browser/resources/goo... File chrome/browser/resources/google_now/background.js (right): https://codereview.chromium.org/183883027/diff/1/chrome/browser/resources/goo... chrome/browser/resources/google_now/background.js:670: * @return {Promise} A promise to request the card dimissal, rejects on error. dismissal https://codereview.chromium.org/183883027/diff/1/chrome/browser/resources/goo... chrome/browser/resources/google_now/background.js:755: dismissal.dismissalData.notificationId] = move this onto previous line
https://codereview.chromium.org/183883027/diff/1/chrome/browser/resources/goo... File chrome/browser/resources/google_now/background.js (right): https://codereview.chromium.org/183883027/diff/1/chrome/browser/resources/goo... chrome/browser/resources/google_now/background.js:670: * @return {Promise} A promise to request the card dimissal, rejects on error. On 2014/03/10 17:43:33, rgustafson wrote: > dismissal Done. https://codereview.chromium.org/183883027/diff/1/chrome/browser/resources/goo... chrome/browser/resources/google_now/background.js:755: dismissal.dismissalData.notificationId] = On 2014/03/10 17:43:33, rgustafson wrote: > move this onto previous line Done.
lgtm
vadimt: Please provide owner approval of this CL.
lgtm
This CL will be submitted once https://codereview.chromium.org/187263002/ is committed.
The CQ bit was checked by robliao@chromium.org
The CQ bit was unchecked by robliao@chromium.org
The CQ bit was checked by robliao@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/robliao@chromium.org/183883027/40001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: tryserver.chromium on win_chromium_compile_dbg
The CQ bit was checked by robliao@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/robliao@chromium.org/183883027/40001
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/robliao@chromium.org/183883027/40001
Message was sent while issue was closed.
Change committed as 257025 |