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

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

Issue 2828021: Take 2: sync changes to support encryption (Closed)
Patch Set: fix flaky password test under valgrind Created 10 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/sync/engine/apply_updates_command_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/apply_updates_command.h" 5 #include "chrome/browser/sync/engine/apply_updates_command.h"
6 6
7 #include "chrome/browser/sync/engine/update_applicator.h" 7 #include "chrome/browser/sync/engine/update_applicator.h"
8 #include "chrome/browser/sync/sessions/sync_session.h" 8 #include "chrome/browser/sync/sessions/sync_session.h"
9 #include "chrome/browser/sync/syncable/directory_manager.h" 9 #include "chrome/browser/sync/syncable/directory_manager.h"
10 #include "chrome/browser/sync/syncable/syncable.h" 10 #include "chrome/browser/sync/syncable/syncable.h"
(...skipping 10 matching lines...) Expand all
21 syncable::ScopedDirLookup dir(session->context()->directory_manager(), 21 syncable::ScopedDirLookup dir(session->context()->directory_manager(),
22 session->context()->account_name()); 22 session->context()->account_name());
23 if (!dir.good()) { 23 if (!dir.good()) {
24 LOG(ERROR) << "Scoped dir lookup failed!"; 24 LOG(ERROR) << "Scoped dir lookup failed!";
25 return; 25 return;
26 } 26 }
27 syncable::WriteTransaction trans(dir, syncable::SYNCER, __FILE__, __LINE__); 27 syncable::WriteTransaction trans(dir, syncable::SYNCER, __FILE__, __LINE__);
28 syncable::Directory::UnappliedUpdateMetaHandles handles; 28 syncable::Directory::UnappliedUpdateMetaHandles handles;
29 dir->GetUnappliedUpdateMetaHandles(&trans, &handles); 29 dir->GetUnappliedUpdateMetaHandles(&trans, &handles);
30 30
31 UpdateApplicator applicator(session->context()->resolver(), handles.begin(), 31 UpdateApplicator applicator(
32 handles.end(), session->routing_info(), 32 session->context()->resolver(),
33 session->context()->directory_manager()->cryptographer(),
34 handles.begin(), handles.end(), session->routing_info(),
33 session->status_controller()->group_restriction()); 35 session->status_controller()->group_restriction());
34 while (applicator.AttemptOneApplication(&trans)) {} 36 while (applicator.AttemptOneApplication(&trans)) {}
35 applicator.SaveProgressIntoSessionState( 37 applicator.SaveProgressIntoSessionState(
36 session->status_controller()->mutable_conflict_progress(), 38 session->status_controller()->mutable_conflict_progress(),
37 session->status_controller()->mutable_update_progress()); 39 session->status_controller()->mutable_update_progress());
38 } 40 }
39 41
40 } // namespace browser_sync 42 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/engine/apply_updates_command_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698