Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 |
| OLD | NEW |