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

Side by Side Diff: chrome/browser/sync/engine/model_changing_syncer_command.cc

Issue 8366030: Introduce the plumbing necessary to report Unrecoverable error from model safe workers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For a high level review. Created 9 years, 2 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/engine/model_changing_syncer_command.h" 5 #include "chrome/browser/sync/engine/model_changing_syncer_command.h"
6 6
7 #include "base/callback_old.h" 7 #include "base/callback_old.h"
8 #include "chrome/browser/sync/engine/model_safe_worker.h" 8 #include "chrome/browser/sync/engine/model_safe_worker.h"
9 #include "chrome/browser/sync/sessions/status_controller.h" 9 #include "chrome/browser/sync/sessions/status_controller.h"
10 #include "chrome/browser/sync/sessions/sync_session.h" 10 #include "chrome/browser/sync/sessions/sync_session.h"
(...skipping 30 matching lines...) Expand all
41 VLOG(2) << "Skipping worker for group " 41 VLOG(2) << "Skipping worker for group "
42 << ModelSafeGroupToString(group); 42 << ModelSafeGroupToString(group);
43 continue; 43 continue;
44 } 44 }
45 45
46 sessions::StatusController* status = work_session_->status_controller(); 46 sessions::StatusController* status = work_session_->status_controller();
47 sessions::ScopedModelSafeGroupRestriction r(status, group); 47 sessions::ScopedModelSafeGroupRestriction r(status, group);
48 scoped_ptr<Callback0::Type> c(NewCallback(this, 48 scoped_ptr<Callback0::Type> c(NewCallback(this,
49 &ModelChangingSyncerCommand::StartChangingModel)); 49 &ModelChangingSyncerCommand::StartChangingModel));
50 worker->DoWorkAndWaitUntilDone(c.get()); 50 worker->DoWorkAndWaitUntilDone(c.get());
51
52 if (session->unrecoverable_error()) {
akalin 2011/10/21 22:18:27 Why not just make the (optional) unrecoverable err
lipalani1 2011/10/21 23:40:03 Agreed On 2011/10/21 22:18:27, akalin wrote:
53 // We are back on the syncer thread. Now use the delegate to send the
54 // error.
55 DCHECK(session->unrecoverable_error_info());
56 session->delegate()->OnUnrecoverableError(
57 session->unrecoverable_error_info()->location,
58 session->unrecoverable_error_info()->message);
59 break;
60 }
51 } 61 }
52 } 62 }
53 63
54 bool ModelChangingSyncerCommand::ModelNeutralExecuteImpl( 64 bool ModelChangingSyncerCommand::ModelNeutralExecuteImpl(
55 sessions::SyncSession* session) { 65 sessions::SyncSession* session) {
56 return true; 66 return true;
57 } 67 }
58 68
59 } // namespace browser_sync 69 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/apply_updates_command.cc ('k') | chrome/browser/sync/engine/sync_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698