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

Issue 367063005: Use new sync backup DB if settings are reset to avoid undoing reset. (Closed)

Created:
6 years, 5 months ago by haitaol1
Modified:
6 years, 5 months ago
Reviewers:
gab, Nicolas Zea, rlarocque
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, zea+watch_chromium.org, maniscalco+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Use new sync backup DB if settings are reset to avoid undoing reset from backup data, e.g. reinstall removed extensions, etc. BUG=389690 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282409

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Total comments: 1

Patch Set 4 : #

Patch Set 5 : #

Total comments: 4

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -13 lines) Patch
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 2 chunks +15 lines, -5 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_unittest.cc View 1 2 3 4 5 6 chunks +30 lines, -8 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
gab
lgtm w/ one request Would also be nice to have a test for this. Thanks! ...
6 years, 5 months ago (2014-07-03 13:08:53 UTC) #1
haitaol1
https://codereview.chromium.org/367063005/diff/20001/chrome/browser/sync/profile_sync_service.cc File chrome/browser/sync/profile_sync_service.cc (right): https://codereview.chromium.org/367063005/diff/20001/chrome/browser/sync/profile_sync_service.cc#newcode524 chrome/browser/sync/profile_sync_service.cc:524: << PrefHashFilter::GetResetTime(profile_->GetPrefs()).ToInternalValue(); On 2014/07/03 13:08:53, gab wrote: > Please ...
6 years, 5 months ago (2014-07-07 20:43:19 UTC) #2
haitaol1
6 years, 5 months ago (2014-07-07 20:46:16 UTC) #3
gab
Would ProfileSyncServiceStartupTest be well-suited to add a test for this? (e.g., to catch a regression ...
6 years, 5 months ago (2014-07-07 20:56:12 UTC) #4
haitaol1
On 2014/07/07 20:56:12, gab wrote: > Would ProfileSyncServiceStartupTest be well-suited to add a test for ...
6 years, 5 months ago (2014-07-07 21:09:15 UTC) #5
gab
On 2014/07/07 21:09:15, haitaol1 wrote: > On 2014/07/07 20:56:12, gab wrote: > > Would ProfileSyncServiceStartupTest ...
6 years, 5 months ago (2014-07-07 21:22:28 UTC) #6
haitaol1
On 2014/07/07 21:22:28, gab wrote: > On 2014/07/07 21:09:15, haitaol1 wrote: > > On 2014/07/07 ...
6 years, 5 months ago (2014-07-07 23:40:44 UTC) #7
gab
lgtm w/ nits Thanks! Gab https://codereview.chromium.org/367063005/diff/80001/chrome/browser/sync/profile_sync_service_unittest.cc File chrome/browser/sync/profile_sync_service_unittest.cc (right): https://codereview.chromium.org/367063005/diff/80001/chrome/browser/sync/profile_sync_service_unittest.cc#newcode606 chrome/browser/sync/profile_sync_service_unittest.cc:606: FROM_HERE, base::Bind(&QuitLoop), nit: one ...
6 years, 5 months ago (2014-07-08 14:27:06 UTC) #8
haitaol1
https://codereview.chromium.org/367063005/diff/80001/chrome/browser/sync/profile_sync_service_unittest.cc File chrome/browser/sync/profile_sync_service_unittest.cc (right): https://codereview.chromium.org/367063005/diff/80001/chrome/browser/sync/profile_sync_service_unittest.cc#newcode606 chrome/browser/sync/profile_sync_service_unittest.cc:606: FROM_HERE, base::Bind(&QuitLoop), On 2014/07/08 14:27:06, gab wrote: > Instead ...
6 years, 5 months ago (2014-07-08 20:31:40 UTC) #9
haitaol1
Nicolas: can you take a look?
6 years, 5 months ago (2014-07-09 15:45:30 UTC) #10
haitaol1
6 years, 5 months ago (2014-07-10 18:26:05 UTC) #11
rlarocque
lgtm
6 years, 5 months ago (2014-07-10 18:37:36 UTC) #12
haitaol1
The CQ bit was checked by haitaol@chromium.org
6 years, 5 months ago (2014-07-10 19:01:25 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haitaol@chromium.org/367063005/100001
6 years, 5 months ago (2014-07-10 19:02:50 UTC) #14
commit-bot: I haz the power
Change committed as 282409
6 years, 5 months ago (2014-07-10 20:05:31 UTC) #15
gab
Hey Haitao, I just realized that Time::Now() is not guaranteed to be monolithically increasing... this ...
6 years, 5 months ago (2014-07-11 20:15:52 UTC) #16
gab
On 2014/07/11 20:15:52, gab wrote: > Hey Haitao, I just realized that Time::Now() is not ...
6 years, 5 months ago (2014-07-11 20:16:03 UTC) #17
haitaol1
On 2014/07/11 20:16:03, gab wrote: > On 2014/07/11 20:15:52, gab wrote: > > Hey Haitao, ...
6 years, 5 months ago (2014-07-11 21:05:20 UTC) #18
gab
6 years, 5 months ago (2014-07-14 15:21:47 UTC) #19
Message was sent while issue was closed.
On 2014/07/11 21:05:20, haitaol1 wrote:
> On 2014/07/11 20:16:03, gab wrote:
> > On 2014/07/11 20:15:52, gab wrote:
> > > Hey Haitao, I just realized that Time::Now() is not guaranteed to be
> > > monolithically increasing... this could be problematic with the check used
> in
> > > this CL.
> > 
> >
>
https://code.google.com/p/chromium/codesearch#chromium/src/base/time/time.h&l...
> > 
> > > 
> > > I haven't looked at the impl in details to understand when that is, would
be
> > > worth figuring out, perhaps it's only if the user changes his system clock
> > which
> > > would then be okay...
> > > 
> > > Cheers,
> > > Gab
> 
> That's true. The previous saved reset time could be after profile start time.
In
> that case, sync backup db is erased unnecessarily but it's still correct.
> Because the window between profile start and pref check is very small, I think
> the chance that clock goes back in that window is very small.

Okay sgtm. Glad we at least made sure this was okay.

Powered by Google App Engine
This is Rietveld 408576698