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

Side by Side Diff: components/sync/base/immutable_unittest.cc

Issue 2689773002: [Sync] Replace typedef with using. (Closed)
Patch Set: [Sync] Replace typedef with using. Created 3 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
« no previous file with comments | « components/sync/base/immutable.h ('k') | components/sync/base/model_type.h » ('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 (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 <cstddef> 7 #include <cstddef>
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <set> 10 #include <set>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Google-style swap. 80 // Google-style swap.
81 void Swap(TokenBase* other) { 81 void Swap(TokenBase* other) {
82 using std::swap; 82 using std::swap;
83 swap(other->core_, core_); 83 swap(other->core_, core_);
84 } 84 }
85 85
86 private: 86 private:
87 scoped_refptr<TokenCore> core_; 87 scoped_refptr<TokenCore> core_;
88 }; 88 };
89 89
90 typedef TokenBase<USE_DEFAULT_SWAP> Token; 90 using Token = TokenBase<USE_DEFAULT_SWAP>;
91 typedef TokenBase<USE_FAST_SWAP_VIA_ADL> ADLToken; 91 using ADLToken = TokenBase<USE_FAST_SWAP_VIA_ADL>;
92 typedef TokenBase<USE_FAST_SWAP_VIA_SPECIALIZATION> SpecializationToken; 92 using SpecializationToken = TokenBase<USE_FAST_SWAP_VIA_SPECIALIZATION>;
93 93
94 void swap(ADLToken& t1, ADLToken& t2) { 94 void swap(ADLToken& t1, ADLToken& t2) {
95 t1.Swap(&t2); 95 t1.Swap(&t2);
96 } 96 }
97 97
98 } // namespace syncer 98 } // namespace syncer
99 99
100 // Allowed by the standard (17.4.3.1/1). 100 // Allowed by the standard (17.4.3.1/1).
101 namespace std { 101 namespace std {
102 102
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 TEST_F(ImmutableTest, List) { 225 TEST_F(ImmutableTest, List) {
226 RunTokenContainerTest<std::list<Token>, Immutable<std::list<Token>>>("List"); 226 RunTokenContainerTest<std::list<Token>, Immutable<std::list<Token>>>("List");
227 } 227 }
228 228
229 TEST_F(ImmutableTest, Set) { 229 TEST_F(ImmutableTest, Set) {
230 RunTokenContainerTest<std::set<Token>, Immutable<std::set<Token>>>("Set"); 230 RunTokenContainerTest<std::set<Token>, Immutable<std::set<Token>>>("Set");
231 } 231 }
232 232
233 } // namespace 233 } // namespace
234 } // namespace syncer 234 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/base/immutable.h ('k') | components/sync/base/model_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698