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/resolve_conflicts_command.h" | 5 #include "chrome/browser/sync/engine/resolve_conflicts_command.h" |
6 | 6 |
7 #include "chrome/browser/sync/engine/conflict_resolver.h" | 7 #include "chrome/browser/sync/engine/conflict_resolver.h" |
8 #include "chrome/browser/sync/sessions/session_state.h" | 8 #include "chrome/browser/sync/sessions/session_state.h" |
9 #include "chrome/browser/sync/sessions/sync_session.h" | 9 #include "chrome/browser/sync/sessions/sync_session.h" |
10 #include "chrome/browser/sync/syncable/directory_manager.h" | 10 #include "chrome/browser/sync/syncable/directory_manager.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 return; | 27 return; |
28 | 28 |
29 syncable::ScopedDirLookup dir(session->context()->directory_manager(), | 29 syncable::ScopedDirLookup dir(session->context()->directory_manager(), |
30 session->context()->account_name()); | 30 session->context()->account_name()); |
31 if (!dir.good()) | 31 if (!dir.good()) |
32 return; | 32 return; |
33 sessions::StatusController* status = session->mutable_status_controller(); | 33 sessions::StatusController* status = session->mutable_status_controller(); |
34 const sessions::ConflictProgress* progress = status->conflict_progress(); | 34 const sessions::ConflictProgress* progress = status->conflict_progress(); |
35 if (!progress) | 35 if (!progress) |
36 return; // Nothing to do. | 36 return; // Nothing to do. |
| 37 syncable::WriteTransaction trans(FROM_HERE, syncable::SYNCER, dir); |
| 38 const Cryptographer* cryptographer = |
| 39 session->context()->directory_manager()->GetCryptographer(&trans); |
37 status->update_conflicts_resolved( | 40 status->update_conflicts_resolved( |
38 resolver->ResolveConflicts(dir, *progress, status)); | 41 resolver->ResolveConflicts(&trans, cryptographer, *progress, status)); |
39 } | 42 } |
40 | 43 |
41 } // namespace browser_sync | 44 } // namespace browser_sync |
OLD | NEW |