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

Side by Side Diff: chrome/browser/sync/sessions/ordered_commit_set.h

Issue 8922015: [Sync] Don't commit items with predecessors/parents in conflict. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments + rebase Created 8 years, 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_SESSIONS_ORDERED_COMMIT_SET_H_ 5 #ifndef CHROME_BROWSER_SYNC_SESSIONS_ORDERED_COMMIT_SET_H_
6 #define CHROME_BROWSER_SYNC_SESSIONS_ORDERED_COMMIT_SET_H_ 6 #define CHROME_BROWSER_SYNC_SESSIONS_ORDERED_COMMIT_SET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 70
71 int Size() const { 71 int Size() const {
72 return commit_ids_.size(); 72 return commit_ids_.size();
73 } 73 }
74 74
75 // Returns true iff any of the commit ids added to this set have model type 75 // Returns true iff any of the commit ids added to this set have model type
76 // BOOKMARKS. 76 // BOOKMARKS.
77 bool HasBookmarkCommitId() const; 77 bool HasBookmarkCommitId() const;
78 78
79 void Append(const OrderedCommitSet& other);
79 void AppendReverse(const OrderedCommitSet& other); 80 void AppendReverse(const OrderedCommitSet& other);
80 void Truncate(size_t max_size); 81 void Truncate(size_t max_size);
81 82
82 void operator=(const OrderedCommitSet& other); 83 void operator=(const OrderedCommitSet& other);
83 private: 84 private:
84 // A set of CommitIdProjections associated with particular ModelSafeGroups. 85 // A set of CommitIdProjections associated with particular ModelSafeGroups.
85 typedef std::map<browser_sync::ModelSafeGroup, Projection> Projections; 86 typedef std::map<browser_sync::ModelSafeGroup, Projection> Projections;
86 87
87 // Helper container for return value of GetCommitItemAt. 88 // Helper container for return value of GetCommitItemAt.
88 struct CommitItem { 89 struct CommitItem {
(...skipping 20 matching lines...) Expand all
109 std::vector<syncable::ModelType> types_; 110 std::vector<syncable::ModelType> types_;
110 111
111 browser_sync::ModelSafeRoutingInfo routes_; 112 browser_sync::ModelSafeRoutingInfo routes_;
112 }; 113 };
113 114
114 } // namespace sessions 115 } // namespace sessions
115 } // namespace browser_sync 116 } // namespace browser_sync
116 117
117 #endif // CHROME_BROWSER_SYNC_SESSIONS_ORDERED_COMMIT_SET_H_ 118 #endif // CHROME_BROWSER_SYNC_SESSIONS_ORDERED_COMMIT_SET_H_
118 119
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/syncer_unittest.cc ('k') | chrome/browser/sync/sessions/ordered_commit_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698