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

Issue 10694013: Shade uninitialized about:sync fields (Closed)

Created:
8 years, 5 months ago by rlarocque
Modified:
8 years, 5 months ago
Reviewers:
akalin
CC:
chromium-reviews, Raghu Simha, ncarter (slow), arv (Not doing code reviews), akalin, tim (not reviewing)
Visibility:
Public.

Description

Shade uninitialized about:sync fields This change includes the UI and C++ changes required to highlight uninitialized fields in about:sync. On the UI side, the sync details now include an 'is_valid' field which drives some logic in jstemplate and CSS that will change the gray out the text for uninitialized values. The is_valid field is populated in sync_ui_util. The Add*SyncDetails() functions now take an additional 'is_valid' parameter, which indicates whether or not the value is believed to have originated from within sync, rather than some default constructor. The signature for ProfileSyncService::QueryDetailedSyncStatus() has been modified to return an additional parameter indicating whether or not the returned status actually came from the backend. This is used to populate the 'is_valid' field for the many about:sync fields whose values originate from this function. The SyncSesionSnapshot takes a different approach. The object is immutable and has two constructors. If it is constructed with the zero-argument constructor it is clearly uninitialized, and will remain so. This change adds a flag which is set or unset based on which constructor is used. This flag is used to populte the 'is_valid' field for about:sync values populated from the snapshot. BUG=134927 TEST=

Patch Set 1 #

Patch Set 2 : Minor fixes #

Patch Set 3 : Rebase #

Patch Set 4 : Update mocks #

Patch Set 5 : Fix another mock issue #

Patch Set 6 : Another namespace change, another rebase #

Patch Set 7 : Fix one more test error #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+233 lines, -145 lines) Patch
M chrome/browser/resources/sync_internals/about.html View 3 chunks +12 lines, -5 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.h View 1 2 3 4 5 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 4 5 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_harness.cc View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_mock.h View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/sync_global_error_unittest.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/sync/sync_ui_util.h View 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/sync/sync_ui_util.cc View 1 2 3 4 5 10 chunks +150 lines, -101 lines 0 comments Download
M chrome/browser/sync/sync_ui_util_unittest.cc View 1 2 3 4 5 6 11 chunks +32 lines, -23 lines 0 comments Download
M sync/internal_api/public/sessions/sync_session_snapshot.h View 1 2 3 4 5 2 chunks +5 lines, -0 lines 2 comments Download
M sync/internal_api/public/sessions/sync_session_snapshot.cc View 1 2 3 4 5 3 chunks +8 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
rlarocque
I don't think this change solves *all* about:sync problems related to uninitialized data. However, it ...
8 years, 5 months ago (2012-06-30 00:27:37 UTC) #1
akalin
I thought about it and I'm not a big fan of the 'is_valid' flag. :/ ...
8 years, 5 months ago (2012-07-02 21:18:25 UTC) #2
rlarocque
Pre-registering fields? That's an interesting idea. I've been moving in precisely the opposite direction lately, ...
8 years, 5 months ago (2012-07-02 21:50:26 UTC) #3
akalin
This is obsolete, right?
8 years, 5 months ago (2012-07-20 00:22:25 UTC) #4
rlarocque
8 years, 5 months ago (2012-07-20 00:35:27 UTC) #5
On 2012/07/20 00:22:25, akalin wrote:
> This is obsolete, right?

Yes.  I'll delete it.

Powered by Google App Engine
This is Rietveld 408576698