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

Issue 162283002: Move towards event-driven JS on about:sync (Closed)

Created:
6 years, 10 months ago by rlarocque
Modified:
6 years, 10 months ago
Reviewers:
Nicolas Zea, Dan Beam
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, arv+watch_chromium.org, maniscalco+watch_chromium.org
Visibility:
Public.

Description

Move towards event-driven JS on about:sync Removes two callback-based about:sync functions and replaces them with alternatives that are more event-based. Replaces getAboutInfo and the onServiceStatusChanged event with requestUpdatedAboutInfo and an onAboutInfoUpdated event. Unlike its predecessor, the requestUpdatedAboutInfo function does not take a callback. Instead, it requests that the message handler issue an onAboutInfoUpdated event. It is assumed that the caller of this function is already subscribed to receive a callback for this event. The onAboutInfoUpdated event differs from its predecessor in that it provides a 'details' member that contains the updated aboutInfo. This CL also makes the SyncInternalsMessageHandler observe ProfileSyncService events directly, rather than having these events routed through the JsEventHandler. Replaces getListOfTypes with requestListOfTypes. The new function does not take a callback. The response will arrive in the form of an onReceivedListOfTypes event. BUG=334431, 328606 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251851

Patch Set 1 #

Patch Set 2 : Rebase + fix some issues #

Patch Set 3 : Rebase + fix some issues (reupload) #

Total comments: 13

Patch Set 4 : Review fixes and rebase #

Total comments: 1

Patch Set 5 : Small fix and reupload #

Patch Set 6 : Another reupload #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -49 lines) Patch
M chrome/browser/resources/sync_internals/about.js View 1 2 3 2 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/resources/sync_internals/chrome_sync.js View 3 chunks +20 lines, -7 lines 0 comments Download
M chrome/browser/resources/sync_internals/data.js View 1 1 chunk +13 lines, -4 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/sync_internals_browsertest.js View 1 1 chunk +1 line, -1 line 0 comments Download
chrome/browser/ui/webui/sync_internals_message_handler.h View 1 2 3 3 chunks +19 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/sync_internals_message_handler.cc View 1 2 3 4 4 chunks +34 lines, -20 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
rlarocque
Here's the follow-up to https://codereview.chromium.org/160083002/. Now that we have a nicer event handling framework in ...
6 years, 10 months ago (2014-02-13 19:43:26 UTC) #1
Dan Beam
looks pretty good to me :) https://codereview.chromium.org/162283002/diff/60001/chrome/browser/resources/sync_internals/about.js File chrome/browser/resources/sync_internals/about.js (right): https://codereview.chromium.org/162283002/diff/60001/chrome/browser/resources/sync_internals/about.js#newcode33 chrome/browser/resources/sync_internals/about.js:33: refreshAboutInfo(aboutInfo); nit: refreshAboutInfo(e.details); ...
6 years, 10 months ago (2014-02-13 22:32:45 UTC) #2
rlarocque
Addressed most comments. PTAL. https://codereview.chromium.org/162283002/diff/60001/chrome/browser/resources/sync_internals/about.js File chrome/browser/resources/sync_internals/about.js (right): https://codereview.chromium.org/162283002/diff/60001/chrome/browser/resources/sync_internals/about.js#newcode33 chrome/browser/resources/sync_internals/about.js:33: refreshAboutInfo(aboutInfo); On 2014/02/13 22:32:45, Dan ...
6 years, 10 months ago (2014-02-13 23:34:30 UTC) #3
Dan Beam
lgtm https://codereview.chromium.org/162283002/diff/170001/chrome/browser/ui/webui/sync_internals_message_handler.cc File chrome/browser/ui/webui/sync_internals_message_handler.cc (right): https://codereview.chromium.org/162283002/diff/170001/chrome/browser/ui/webui/sync_internals_message_handler.cc#newcode40 chrome/browser/ui/webui/sync_internals_message_handler.cc:40: service->AddObserver(this); nit: seems like you could combine this ...
6 years, 10 months ago (2014-02-14 22:22:39 UTC) #4
Nicolas Zea
Looks like the pss.cc file has a chunk mismatch, mind reuploading?
6 years, 10 months ago (2014-02-14 22:23:49 UTC) #5
rlarocque
On 2014/02/14 22:23:49, Nicolas Zea wrote: > Looks like the pss.cc file has a chunk ...
6 years, 10 months ago (2014-02-14 22:39:58 UTC) #6
Dan Beam
On 2014/02/14 22:39:58, rlarocque wrote: > On 2014/02/14 22:23:49, Nicolas Zea wrote: > > Looks ...
6 years, 10 months ago (2014-02-14 22:44:24 UTC) #7
Nicolas Zea
lgtm
6 years, 10 months ago (2014-02-18 19:55:36 UTC) #8
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 10 months ago (2014-02-18 19:56:29 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/162283002/450001
6 years, 10 months ago (2014-02-18 19:56:40 UTC) #10
commit-bot: I haz the power
6 years, 10 months ago (2014-02-18 21:50:54 UTC) #11
Message was sent while issue was closed.
Change committed as 251851

Powered by Google App Engine
This is Rietveld 408576698