summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorlipalani@chromium.org <lipalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 21:12:36 +0000
committerlipalani@chromium.org <lipalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 21:12:36 +0000
commit8b0a7b0ab95dc4c25ba143560df45cefd0fc0d73 (patch)
tree5f065dce105a398c966d6298bf0accf688411ca4 /chrome
parent84f4c303b828157bb0bf81982b6d328501235f15 (diff)
downloadchromium_src-8b0a7b0ab95dc4c25ba143560df45cefd0fc0d73.zip
chromium_src-8b0a7b0ab95dc4c25ba143560df45cefd0fc0d73.tar.gz
chromium_src-8b0a7b0ab95dc4c25ba143560df45cefd0fc0d73.tar.bz2
Add extra logging to prove a theory for the race condition in bug 81256.
BUG=80706 TEST= Review URL: http://codereview.chromium.org/6932049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84313 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/sync/engine/syncer_thread.cc8
-rw-r--r--chrome/browser/sync/glue/data_type_manager_impl.cc2
-rw-r--r--chrome/browser/sync/glue/sync_backend_host.cc4
3 files changed, 11 insertions, 3 deletions
diff --git a/chrome/browser/sync/engine/syncer_thread.cc b/chrome/browser/sync/engine/syncer_thread.cc
index b4639d9..edf66a0 100644
--- a/chrome/browser/sync/engine/syncer_thread.cc
+++ b/chrome/browser/sync/engine/syncer_thread.cc
@@ -396,7 +396,7 @@ void SyncerThread::ScheduleNudgeImpl(const TimeDelta& delay,
pending_nudge_->session->Coalesce(*(job.session.get()));
if (!IsBackingOff()) {
- VLOG(1) << "SyncerThread(" << this << ")" << " Dropping a nudge because"
+ VLOG(0) << "SyncerThread(" << this << ")" << " Dropping a nudge because"
<< " we are not in backoff and the job was coalesced";
return;
} else {
@@ -547,8 +547,12 @@ void SyncerThread::DoSyncSessionJob(const SyncSessionJob& job) {
}
if (job.purpose == SyncSessionJob::NUDGE) {
- if (pending_nudge_.get() == NULL || pending_nudge_->session != job.session)
+ if (pending_nudge_.get() == NULL ||
+ pending_nudge_->session != job.session) {
+ VLOG(0) << "SyncerThread(" << this << ")" << "Dropping a nudge in "
+ << "DoSyncSessionJob because another nudge was scheduled";
return; // Another nudge must have been scheduled in in the meantime.
+ }
pending_nudge_.reset();
// Create the session with the latest model safe table and use it to purge
diff --git a/chrome/browser/sync/glue/data_type_manager_impl.cc b/chrome/browser/sync/glue/data_type_manager_impl.cc
index 8496082..a918f46 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl.cc
+++ b/chrome/browser/sync/glue/data_type_manager_impl.cc
@@ -363,7 +363,7 @@ void DataTypeManagerImpl::NotifyDone(ConfigureResult result,
const tracked_objects::Location& location) {
ConfigureResultWithErrorLocation result_with_location(result, location,
last_requested_types_);
- VLOG(0) << "NotifyDone called with result: " << result;
+ VLOG(1) << "NotifyDone called with result: " << result;
NotificationService::current()->Notify(
NotificationType::SYNC_CONFIGURE_DONE,
Source<DataTypeManager>(this),
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index 5b39a95..782d922 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -456,6 +456,8 @@ void SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop() {
// If we've added types, we always want to request a nudge/config (even if
// the initial sync is ended), in case we could not decrypt the data.
if (pending_config_mode_state_->added_types.none()) {
+ VLOG(0) << "SyncBackendHost(" << this << "): No new types added. "
+ << "Calling ready_task directly";
// No new types - just notify the caller that the types are available.
pending_config_mode_state_->ready_task->Run();
} else {
@@ -464,6 +466,8 @@ void SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop() {
syncable::ModelTypeBitSet types_copy(pending_download_state_->added_types);
if (IsNigoriEnabled())
types_copy.set(syncable::NIGORI);
+ VLOG(0) << "SyncBackendHost(" << this << "):New Types added. "
+ << "Calling DoRequestConfig";
core_thread_.message_loop()->PostTask(FROM_HERE,
NewRunnableMethod(core_.get(),
&SyncBackendHost::Core::DoRequestConfig,