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

Side by Side Diff: sync/engine/get_commit_ids.cc

Issue 72403003: sync: Per-type update application (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + fix typo Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/engine/download_unittest.cc ('k') | sync/engine/model_changing_syncer_command.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "sync/engine/get_commit_ids.h" 5 #include "sync/engine/get_commit_ids.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 ModelTypeSet encrypted_types; 66 ModelTypeSet encrypted_types;
67 bool passphrase_missing = false; 67 bool passphrase_missing = false;
68 Cryptographer* cryptographer = dir->GetCryptographer(trans); 68 Cryptographer* cryptographer = dir->GetCryptographer(trans);
69 if (cryptographer) { 69 if (cryptographer) {
70 encrypted_types = dir->GetNigoriHandler()->GetEncryptedTypes(trans); 70 encrypted_types = dir->GetNigoriHandler()->GetEncryptedTypes(trans);
71 passphrase_missing = cryptographer->has_pending_keys(); 71 passphrase_missing = cryptographer->has_pending_keys();
72 }; 72 };
73 73
74 // We filter out all unready entries from the set of unsynced handles. This 74 // We filter out all unready entries from the set of unsynced handles. This
75 // new set of ready and unsynced items is then what we use to determine what 75 // new set of ready and unsynced items is then what we use to determine what
76 // is a candidate for commit. The caller of this SyncerCommand is responsible 76 // is a candidate for commit. The caller is responsible for ensuring that no
77 // for ensuring that no throttled types are included among the 77 // throttled types are included among the requested_types.
78 // requested_types.
79 FilterUnreadyEntries(trans, 78 FilterUnreadyEntries(trans,
80 ModelTypeSet(type), 79 ModelTypeSet(type),
81 encrypted_types, 80 encrypted_types,
82 passphrase_missing, 81 passphrase_missing,
83 all_unsynced_handles, 82 all_unsynced_handles,
84 &ready_unsynced_set); 83 &ready_unsynced_set);
85 84
86 OrderCommitIds(trans, max_entries, ready_unsynced_set, out); 85 OrderCommitIds(trans, max_entries, ready_unsynced_set, out);
87 86
88 for (size_t i = 0; i < out->size(); i++) { 87 for (size_t i = 0; i < out->size(); i++) {
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 // Add moves and creates, and prepend their uncommitted parents. 499 // Add moves and creates, and prepend their uncommitted parents.
501 traversal.AddCreatesAndMoves(ready_unsynced_set); 500 traversal.AddCreatesAndMoves(ready_unsynced_set);
502 501
503 // Add all deletes. 502 // Add all deletes.
504 traversal.AddDeletes(ready_unsynced_set); 503 traversal.AddDeletes(ready_unsynced_set);
505 } 504 }
506 505
507 } // namespace 506 } // namespace
508 507
509 } // namespace syncer 508 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/download_unittest.cc ('k') | sync/engine/model_changing_syncer_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698