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

Unified Diff: chrome/browser/sync/glue/ui_model_worker.cc

Issue 9036003: Avoid useless SYNC_CYCLE_CONTINUATION sync cycle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/glue/ui_model_worker.h ('k') | chrome/browser/sync/glue/ui_model_worker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/ui_model_worker.cc
diff --git a/chrome/browser/sync/glue/ui_model_worker.cc b/chrome/browser/sync/glue/ui_model_worker.cc
index 7753e6afd88fcdd64e89970d6ae200f2a18458d9..292cae7b37dc07702e1c129157a7761d29bd753a 100644
--- a/chrome/browser/sync/glue/ui_model_worker.cc
+++ b/chrome/browser/sync/glue/ui_model_worker.cc
@@ -20,7 +20,7 @@ namespace {
void CallDoWorkAndSignalCallback(const WorkCallback& work,
base::WaitableEvent* work_done,
UIModelWorker* const scheduler,
- UnrecoverableErrorInfo* error_info) {
+ SyncerError* error_info) {
if (work.is_null()) {
// This can happen during tests or cases where there are more than just the
// default UIModelWorker in existence and it gets destroyed before
@@ -42,7 +42,7 @@ void CallDoWorkAndSignalCallback(const WorkCallback& work,
} // namespace
-UnrecoverableErrorInfo UIModelWorker::DoWorkAndWaitUntilDone(
+SyncerError UIModelWorker::DoWorkAndWaitUntilDone(
const WorkCallback& work) {
// In most cases, this method is called in WORKING state. It is possible this
// gets called when we are in the RUNNING_MANUAL_SHUTDOWN_PUMP state, because
@@ -51,7 +51,7 @@ UnrecoverableErrorInfo UIModelWorker::DoWorkAndWaitUntilDone(
// code handling this case in Stop(). Note there _no_ way we can be in here
// with state_ = STOPPED, so it is safe to read / compare in this case.
CHECK_NE(ANNOTATE_UNPROTECTED_READ(state_), STOPPED);
- UnrecoverableErrorInfo error_info;
+ SyncerError error_info;
if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
DLOG(WARNING) << "DoWorkAndWaitUntilDone called from "
<< "ui_loop_. Probably a nested invocation?";
@@ -66,7 +66,6 @@ UnrecoverableErrorInfo UIModelWorker::DoWorkAndWaitUntilDone(
// The task is owned by the message loop as per usual.
base::AutoLock lock(lock_);
DCHECK(pending_work_.is_null());
- UnrecoverableErrorInfo error_info;
pending_work_ = base::Bind(&CallDoWorkAndSignalCallback, work, &work_done,
base::Unretained(this), &error_info);
if (!BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, pending_work_)) {
« no previous file with comments | « chrome/browser/sync/glue/ui_model_worker.h ('k') | chrome/browser/sync/glue/ui_model_worker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698