| OLD | NEW |
| 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 #include "components/invalidation/public/single_object_invalidation_set.h" | 5 #include "components/invalidation/public/single_object_invalidation_set.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "components/invalidation/public/invalidation_util.h" | 8 #include "components/invalidation/public/invalidation_util.h" |
| 9 | 9 |
| 10 namespace syncer { | 10 namespace syncer { |
| 11 | 11 |
| 12 SingleObjectInvalidationSet::SingleObjectInvalidationSet() {} | 12 SingleObjectInvalidationSet::SingleObjectInvalidationSet() {} |
| 13 | 13 |
| 14 SingleObjectInvalidationSet::SingleObjectInvalidationSet( |
| 15 const SingleObjectInvalidationSet& other) = default; |
| 16 |
| 14 SingleObjectInvalidationSet::~SingleObjectInvalidationSet() {} | 17 SingleObjectInvalidationSet::~SingleObjectInvalidationSet() {} |
| 15 | 18 |
| 16 void SingleObjectInvalidationSet::Insert(const Invalidation& invalidation) { | 19 void SingleObjectInvalidationSet::Insert(const Invalidation& invalidation) { |
| 17 invalidations_.insert(invalidation); | 20 invalidations_.insert(invalidation); |
| 18 } | 21 } |
| 19 | 22 |
| 20 void SingleObjectInvalidationSet::InsertAll( | 23 void SingleObjectInvalidationSet::InsertAll( |
| 21 const SingleObjectInvalidationSet& other) { | 24 const SingleObjectInvalidationSet& other) { |
| 22 invalidations_.insert(other.begin(), other.end()); | 25 invalidations_.insert(other.begin(), other.end()); |
| 23 } | 26 } |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 if (!invalidation) { | 109 if (!invalidation) { |
| 107 DLOG(WARNING) << "Failed to parse invalidation at index " << i; | 110 DLOG(WARNING) << "Failed to parse invalidation at index " << i; |
| 108 return false; | 111 return false; |
| 109 } | 112 } |
| 110 invalidations_.insert(*invalidation); | 113 invalidations_.insert(*invalidation); |
| 111 } | 114 } |
| 112 return true; | 115 return true; |
| 113 } | 116 } |
| 114 | 117 |
| 115 } // namespace syncer | 118 } // namespace syncer |
| OLD | NEW |