|
|
Chromium Code Reviews|
Created:
7 years, 7 months ago by tim (not reviewing) Modified:
7 years, 7 months ago CC:
chromium-reviews, Raman Kakilate, akalin, benquan, Raghu Simha, ahutter, browser-components-watch_chromium.org, dbeam+watch-autofill_chromium.org, Dane Wallinga, dyu1, estade+watch_chromium.org, Albert Bodenhamer, haitaol1, Ilya Sherman Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
Descriptionsync: some fixups for --sync-enabled-deferred-init
TBR=dhollowa@chromium.org
^ web_data_service_factory.cc
BUG=80194
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=200686
Patch Set 1 #
Total comments: 8
Patch Set 2 : review #
Messages
Total messages: 17 (0 generated)
On 2013/05/12 22:50:22, timsteele wrote: ping
https://codereview.chromium.org/14735010/diff/1/chrome/browser/sync/profile_s... File chrome/browser/sync/profile_sync_service.cc (right): https://codereview.chromium.org/14735010/diff/1/chrome/browser/sync/profile_s... chrome/browser/sync/profile_sync_service.cc:508: if (start_up_time_.is_null()) { Do you have to put all the block in if? Is it ok to set only start_up_time_ if it's null?
https://codereview.chromium.org/14735010/diff/1/chrome/browser/sync/profile_s... File chrome/browser/sync/profile_sync_service.cc (right): https://codereview.chromium.org/14735010/diff/1/chrome/browser/sync/profile_s... chrome/browser/sync/profile_sync_service.cc:508: if (start_up_time_.is_null()) { On 2013/05/15 20:20:31, haitaol1 wrote: > Do you have to put all the block in if? Is it ok to set only start_up_time_ if > it's null? It is currently used to report the time spent deferred since the first call to StartUp, which will be ProfileSyncService Initialization, which is done on construction by the factory, which will eventually be done very early on when the Profile is created.
https://codereview.chromium.org/14735010/diff/1/chrome/browser/sync/profile_s... File chrome/browser/sync/profile_sync_service.cc (right): https://codereview.chromium.org/14735010/diff/1/chrome/browser/sync/profile_s... chrome/browser/sync/profile_sync_service.cc:508: if (start_up_time_.is_null()) { Lock-free shutdown may be an issue in future because start_up_time_ is not null if backend is shut down before initialized. Can you move start_up_time_ = base::Time(); in OnBackendInitialized() to ShutdownImpl()? On 2013/05/15 23:18:14, timsteele wrote: > On 2013/05/15 20:20:31, haitaol1 wrote: > > Do you have to put all the block in if? Is it ok to set only start_up_time_ if > > it's null? > > It is currently used to report the time spent deferred since the first call to > StartUp, which will be ProfileSyncService Initialization, which is done on > construction by the factory, which will eventually be done very early on when > the Profile is created. https://codereview.chromium.org/14735010/diff/1/chrome/browser/sync/profile_s... chrome/browser/sync/profile_sync_service.cc:525: sync_global_error_.get()); sync_global_error_ is NULL if defined(OS_ANDROID). Is that right?
https://codereview.chromium.org/14735010/diff/1/chrome/browser/sync/profile_s... File chrome/browser/sync/profile_sync_service.cc (right): https://codereview.chromium.org/14735010/diff/1/chrome/browser/sync/profile_s... chrome/browser/sync/profile_sync_service.cc:508: if (start_up_time_.is_null()) { Actually, that could happen today, right? On 2013/05/16 00:05:57, haitaol1 wrote: > Lock-free shutdown may be an issue in future because start_up_time_ is not null > if backend is shut down before initialized. Can you move > start_up_time_ = base::Time(); > in OnBackendInitialized() to ShutdownImpl()? > > On 2013/05/15 23:18:14, timsteele wrote: > > On 2013/05/15 20:20:31, haitaol1 wrote: > > > Do you have to put all the block in if? Is it ok to set only start_up_time_ > if > > > it's null? > > > > It is currently used to report the time spent deferred since the first call to > > StartUp, which will be ProfileSyncService Initialization, which is done on > > construction by the factory, which will eventually be done very early on when > > the Profile is created. >
https://codereview.chromium.org/14735010/diff/1/chrome/browser/sync/profile_s... File chrome/browser/sync/profile_sync_service.cc (right): https://codereview.chromium.org/14735010/diff/1/chrome/browser/sync/profile_s... chrome/browser/sync/profile_sync_service.cc:508: if (start_up_time_.is_null()) { On 2013/05/16 00:06:59, haitaol1 wrote: > Actually, that could happen today, right? > > On 2013/05/16 00:05:57, haitaol1 wrote: > > Lock-free shutdown may be an issue in future because start_up_time_ is not > null > > if backend is shut down before initialized. Can you move > > start_up_time_ = base::Time(); > > in OnBackendInitialized() to ShutdownImpl()? > > > > On 2013/05/15 23:18:14, timsteele wrote: > > > On 2013/05/15 20:20:31, haitaol1 wrote: > > > > Do you have to put all the block in if? Is it ok to set only > start_up_time_ > > if > > > > it's null? > > > > > > It is currently used to report the time spent deferred since the first call > to > > > StartUp, which will be ProfileSyncService Initialization, which is done on > > > construction by the factory, which will eventually be done very early on > when > > > the Profile is created. > > > OnBackendInitialized should always be called if we've managed to ask the SyncManager to Init itself, so I don't think this causes a problem in practice. But it seems fine to move it, so I did. https://codereview.chromium.org/14735010/diff/1/chrome/browser/sync/profile_s... chrome/browser/sync/profile_sync_service.cc:525: sync_global_error_.get()); On 2013/05/16 00:05:57, haitaol1 wrote: > sync_global_error_ is NULL if defined(OS_ANDROID). Is that right? I believe so, because we don't have errors showing up as Tools menu items on Android.
lgtm https://codereview.chromium.org/14735010/diff/1/chrome/browser/sync/profile_s... File chrome/browser/sync/profile_sync_service.cc (right): https://codereview.chromium.org/14735010/diff/1/chrome/browser/sync/profile_s... chrome/browser/sync/profile_sync_service.cc:508: if (start_up_time_.is_null()) { SyncBackendHost::StopSyncingForShutdown nulls frontend_. So I don't think OnBackendInitialized is guaranteed to be called. Actually, another case where start_up_time_ is not reset on shutdown is when shutdown is called but backend is in deferred startup mode. On 2013/05/16 00:17:25, timsteele wrote: > On 2013/05/16 00:06:59, haitaol1 wrote: > > Actually, that could happen today, right? > > > > On 2013/05/16 00:05:57, haitaol1 wrote: > > > Lock-free shutdown may be an issue in future because start_up_time_ is not > > null > > > if backend is shut down before initialized. Can you move > > > start_up_time_ = base::Time(); > > > in OnBackendInitialized() to ShutdownImpl()? > > > > > > On 2013/05/15 23:18:14, timsteele wrote: > > > > On 2013/05/15 20:20:31, haitaol1 wrote: > > > > > Do you have to put all the block in if? Is it ok to set only > > start_up_time_ > > > if > > > > > it's null? > > > > > > > > It is currently used to report the time spent deferred since the first > call > > to > > > > StartUp, which will be ProfileSyncService Initialization, which is done on > > > > construction by the factory, which will eventually be done very early on > > when > > > > the Profile is created. > > > > > > > OnBackendInitialized should always be called if we've managed to ask the > SyncManager to Init itself, so I don't think this causes a problem in practice. > But it seems fine to move it, so I did.
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an LGTM may have been provided, it was from a non-committer or a lowly provisional committer, _not_ a full super star committer. See http://www.chromium.org/getting-involved/become-a-committer Note that this has nothing to do with OWNERS files.
+zea for OWNERS stamp.
On 2013/05/16 16:56:09, timsteele wrote: > +zea for OWNERS stamp. err, full committer review, I should say :)
lgtm
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tim@chromium.org/14735010/29002
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_p...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tim@chromium.org/14735010/29002
Message was sent while issue was closed.
Committed patchset #2 manually as r200686 (presubmit successful). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
