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

Side by Side Diff: sync/engine/worker_entity_tracker.h

Issue 1866243002: Convert //sync from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SYNC_ENGINE_WORKER_ENTITY_TRACKER_H_ 5 #ifndef SYNC_ENGINE_WORKER_ENTITY_TRACKER_H_
6 #define SYNC_ENGINE_WORKER_ENTITY_TRACKER_H_ 6 #define SYNC_ENGINE_WORKER_ENTITY_TRACKER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
10 #include <string> 11 #include <string>
11 12
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "sync/base/sync_export.h" 15 #include "sync/base/sync_export.h"
16 #include "sync/protocol/sync.pb.h" 16 #include "sync/protocol/sync.pb.h"
17 17
18 namespace syncer_v2 { 18 namespace syncer_v2 {
19 struct CommitRequestData; 19 struct CommitRequestData;
20 struct UpdateResponseData; 20 struct UpdateResponseData;
21 21
22 // Manages the pending commit and update state for an entity on the sync 22 // Manages the pending commit and update state for an entity on the sync
23 // thread. 23 // thread.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 // Used to track in-flight commit requests on the model thread. All we need 107 // Used to track in-flight commit requests on the model thread. All we need
108 // to do here is return it back to the model thread when the pending commit 108 // to do here is return it back to the model thread when the pending commit
109 // is completed and confirmed. Not valid if no commit is pending. 109 // is completed and confirmed. Not valid if no commit is pending.
110 int64_t sequence_number_; 110 int64_t sequence_number_;
111 111
112 // The server version on which this item is based. 112 // The server version on which this item is based.
113 int64_t base_version_; 113 int64_t base_version_;
114 114
115 // A commit for this entity waiting for a sync cycle to be committed. 115 // A commit for this entity waiting for a sync cycle to be committed.
116 scoped_ptr<CommitRequestData> pending_commit_; 116 std::unique_ptr<CommitRequestData> pending_commit_;
117 117
118 // An update for this entity which can't be applied right now. The presence 118 // An update for this entity which can't be applied right now. The presence
119 // of an pending update prevents commits. As of this writing, the only 119 // of an pending update prevents commits. As of this writing, the only
120 // source of pending updates is updates that can't currently be decrypted. 120 // source of pending updates is updates that can't currently be decrypted.
121 scoped_ptr<UpdateResponseData> encrypted_update_; 121 std::unique_ptr<UpdateResponseData> encrypted_update_;
122 122
123 DISALLOW_COPY_AND_ASSIGN(WorkerEntityTracker); 123 DISALLOW_COPY_AND_ASSIGN(WorkerEntityTracker);
124 }; 124 };
125 125
126 } // namespace syncer_v2 126 } // namespace syncer_v2
127 127
128 #endif // SYNC_ENGINE_WORKER_ENTITY_TRACKER_H_ 128 #endif // SYNC_ENGINE_WORKER_ENTITY_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698