| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/sync/base/immutable.h" | 5 #include "components/sync/base/immutable.h" |
| 6 | 6 |
| 7 #include <algorithm> | |
| 8 #include <cstddef> | 7 #include <cstddef> |
| 9 #include <deque> | 8 #include <deque> |
| 10 #include <list> | 9 #include <list> |
| 11 #include <set> | 10 #include <set> |
| 12 #include <string> | 11 #include <string> |
| 13 #include <vector> | 12 #include <vector> |
| 14 | 13 |
| 15 #include "base/macros.h" | |
| 16 #include "base/memory/ref_counted.h" | |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 15 |
| 19 namespace syncer { | 16 namespace syncer { |
| 20 | 17 |
| 21 // Helper class that keeps track of the token passed in at | 18 // Helper class that keeps track of the token passed in at |
| 22 // construction and how many times that token is copied. | 19 // construction and how many times that token is copied. |
| 23 class TokenCore : public base::RefCounted<TokenCore> { | 20 class TokenCore : public base::RefCounted<TokenCore> { |
| 24 public: | 21 public: |
| 25 explicit TokenCore(const char* token) : token_(token), copy_count_(0) {} | 22 explicit TokenCore(const char* token) : token_(token), copy_count_(0) {} |
| 26 | 23 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 TEST_F(ImmutableTest, List) { | 225 TEST_F(ImmutableTest, List) { |
| 229 RunTokenContainerTest<std::list<Token>, Immutable<std::list<Token>>>("List"); | 226 RunTokenContainerTest<std::list<Token>, Immutable<std::list<Token>>>("List"); |
| 230 } | 227 } |
| 231 | 228 |
| 232 TEST_F(ImmutableTest, Set) { | 229 TEST_F(ImmutableTest, Set) { |
| 233 RunTokenContainerTest<std::set<Token>, Immutable<std::set<Token>>>("Set"); | 230 RunTokenContainerTest<std::set<Token>, Immutable<std::set<Token>>>("Set"); |
| 234 } | 231 } |
| 235 | 232 |
| 236 } // namespace | 233 } // namespace |
| 237 } // namespace syncer | 234 } // namespace syncer |
| OLD | NEW |