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

Side by Side Diff: chrome/browser/sync/engine/get_commit_ids_command.h

Issue 7795002: [Sync] Gracefully handle writing to a node when the cryptographer is not ready. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer comments Created 9 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/sync/engine/get_commit_ids_command.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 #ifndef CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_
6 #define CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ 6 #define CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_
7 #pragma once 7 #pragma once
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 11 matching lines...) Expand all
22 class GetCommitIdsCommand : public SyncerCommand { 22 class GetCommitIdsCommand : public SyncerCommand {
23 friend class SyncerTest; 23 friend class SyncerTest;
24 24
25 public: 25 public:
26 explicit GetCommitIdsCommand(int commit_batch_size); 26 explicit GetCommitIdsCommand(int commit_batch_size);
27 virtual ~GetCommitIdsCommand(); 27 virtual ~GetCommitIdsCommand();
28 28
29 // SyncerCommand implementation. 29 // SyncerCommand implementation.
30 virtual void ExecuteImpl(sessions::SyncSession* session); 30 virtual void ExecuteImpl(sessions::SyncSession* session);
31 31
32 // Filter |unsynced_handles| to exclude all handles to entries that require
33 // encryption but are in plaintext.
34 static void FilterEntriesNeedingEncryption(
35 const syncable::ModelTypeSet& encrypted_types,
36 syncable::BaseTransaction* trans,
37 syncable::Directory::UnsyncedMetaHandles* unsynced_handles);
38
32 // Builds a vector of IDs that should be committed. 39 // Builds a vector of IDs that should be committed.
33 void BuildCommitIds(const vector<int64>& unsynced_handles, 40 void BuildCommitIds(const vector<int64>& unsynced_handles,
34 syncable::WriteTransaction* write_transaction, 41 syncable::WriteTransaction* write_transaction,
35 const ModelSafeRoutingInfo& routes); 42 const ModelSafeRoutingInfo& routes);
36 43
37 // TODO(chron): Remove writes from this iterator. As a warning, this 44 // TODO(chron): Remove writes from this iterator. As a warning, this
38 // iterator causes writes to entries and so isn't a pure iterator. 45 // iterator causes writes to entries and so isn't a pure iterator.
39 // It will do Put(IS_UNSYNCED). Refactor this out later. 46 // It will do Put(IS_UNSYNCED). Refactor this out later.
40 class CommitMetahandleIterator { 47 class CommitMetahandleIterator {
41 public: 48 public:
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 scoped_ptr<sessions::OrderedCommitSet> ordered_commit_set_; 144 scoped_ptr<sessions::OrderedCommitSet> ordered_commit_set_;
138 145
139 int requested_commit_batch_size_; 146 int requested_commit_batch_size_;
140 147
141 DISALLOW_COPY_AND_ASSIGN(GetCommitIdsCommand); 148 DISALLOW_COPY_AND_ASSIGN(GetCommitIdsCommand);
142 }; 149 };
143 150
144 } // namespace browser_sync 151 } // namespace browser_sync
145 152
146 #endif // CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ 153 #endif // CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/engine/get_commit_ids_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698