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

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

Issue 1096983002: Update usages of std::map to use ScopedPtrMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@passwordmanager-scopedmemory
Patch Set: Rebase. Created 5 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 | « sync/engine/directory_update_handler_unittest.cc ('k') | sync/engine/entity_tracker.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 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_ENTITY_TRACKER_H_ 5 #ifndef SYNC_ENGINE_ENTITY_TRACKER_H_
6 #define SYNC_ENGINE_ENTITY_TRACKER_H_ 6 #define SYNC_ENGINE_ENTITY_TRACKER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 16 matching lines...) Expand all
27 // commit state, received update state, and can detect conflicts. 27 // commit state, received update state, and can detect conflicts.
28 // 28 //
29 // This object may or may not contain state associated with a pending commit. 29 // This object may or may not contain state associated with a pending commit.
30 // If no commit is pending, the |is_commit_pending_| flag will be set to false 30 // If no commit is pending, the |is_commit_pending_| flag will be set to false
31 // and many of this object's fields will be cleared. 31 // and many of this object's fields will be cleared.
32 class SYNC_EXPORT EntityTracker { 32 class SYNC_EXPORT EntityTracker {
33 public: 33 public:
34 ~EntityTracker(); 34 ~EntityTracker();
35 35
36 // Initialize a new entity based on an update response. 36 // Initialize a new entity based on an update response.
37 static EntityTracker* FromServerUpdate(const std::string& id_string, 37 static scoped_ptr<EntityTracker> FromServerUpdate(
38 const std::string& client_tag_hash, 38 const std::string& id_string,
39 int64 version); 39 const std::string& client_tag_hash,
40 int64 version);
40 41
41 // Initialize a new entity based on a commit request. 42 // Initialize a new entity based on a commit request.
42 static EntityTracker* FromCommitRequest( 43 static scoped_ptr<EntityTracker> FromCommitRequest(
43 const std::string& id_string, 44 const std::string& id_string,
44 const std::string& client_tag_hash, 45 const std::string& client_tag_hash,
45 int64 sequence_number, 46 int64 sequence_number,
46 int64 base_version, 47 int64 base_version,
47 base::Time ctime, 48 base::Time ctime,
48 base::Time mtime, 49 base::Time mtime,
49 const std::string& non_unique_name, 50 const std::string& non_unique_name,
50 bool deleted, 51 bool deleted,
51 const sync_pb::EntitySpecifics& specifics); 52 const sync_pb::EntitySpecifics& specifics);
52 53
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // an pending update prevents commits. As of this writing, the only source 167 // an pending update prevents commits. As of this writing, the only source
167 // of pending updates is updates we can't decrypt right now. 168 // of pending updates is updates we can't decrypt right now.
168 scoped_ptr<UpdateResponseData> pending_update_; 169 scoped_ptr<UpdateResponseData> pending_update_;
169 170
170 DISALLOW_COPY_AND_ASSIGN(EntityTracker); 171 DISALLOW_COPY_AND_ASSIGN(EntityTracker);
171 }; 172 };
172 173
173 } // namespace syncer 174 } // namespace syncer
174 175
175 #endif // SYNC_ENGINE_ENTITY_TRACKER_H_ 176 #endif // SYNC_ENGINE_ENTITY_TRACKER_H_
OLDNEW
« no previous file with comments | « sync/engine/directory_update_handler_unittest.cc ('k') | sync/engine/entity_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698