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 // Immutable<T> provides an easy, cheap, and thread-safe way to pass | 5 // Immutable<T> provides an easy, cheap, and thread-safe way to pass |
6 // large immutable data around. | 6 // large immutable data around. |
7 // | 7 // |
8 // For example, consider the following code: | 8 // For example, consider the following code: |
9 // | 9 // |
10 // typedef std::vector<LargeObject> LargeObjectList; | 10 // typedef std::vector<LargeObject> LargeObjectList; |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 253 |
254 // Helper function to avoid having to write out template arguments. | 254 // Helper function to avoid having to write out template arguments. |
255 template <typename T> | 255 template <typename T> |
256 Immutable<T> MakeImmutable(T* t) { | 256 Immutable<T> MakeImmutable(T* t) { |
257 return Immutable<T>(t); | 257 return Immutable<T>(t); |
258 } | 258 } |
259 | 259 |
260 } // namespace browser_sync | 260 } // namespace browser_sync |
261 | 261 |
262 #endif // SYNC_UTIL_IMMUTABLE_H_ | 262 #endif // SYNC_UTIL_IMMUTABLE_H_ |
OLD | NEW |