| 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 #ifndef BASE_PICKLE_H_ | 5 #ifndef BASE_PICKLE_H_ |
| 6 #define BASE_PICKLE_H_ | 6 #define BASE_PICKLE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 // Just like WriteBytes, but with a compile-time size, for performance. | 289 // Just like WriteBytes, but with a compile-time size, for performance. |
| 290 template<size_t length> void BASE_EXPORT WriteBytesStatic(const void* data); | 290 template<size_t length> void BASE_EXPORT WriteBytesStatic(const void* data); |
| 291 | 291 |
| 292 // Writes a POD by copying its bytes. | 292 // Writes a POD by copying its bytes. |
| 293 template <typename T> bool WritePOD(const T& data) { | 293 template <typename T> bool WritePOD(const T& data) { |
| 294 WriteBytesStatic<sizeof(data)>(&data); | 294 WriteBytesStatic<sizeof(data)>(&data); |
| 295 return true; | 295 return true; |
| 296 } | 296 } |
| 297 inline void WriteBytesCommon(const void* data, size_t length); | 297 inline void WriteBytesCommon(const void* data, size_t length); |
| 298 | 298 |
| 299 FRIEND_TEST_ALL_PREFIXES(PickleTest, DeepCopyResize); |
| 299 FRIEND_TEST_ALL_PREFIXES(PickleTest, Resize); | 300 FRIEND_TEST_ALL_PREFIXES(PickleTest, Resize); |
| 300 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNext); | 301 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNext); |
| 301 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNextWithIncompleteHeader); | 302 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNextWithIncompleteHeader); |
| 302 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNextOverflow); | 303 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNextOverflow); |
| 303 }; | 304 }; |
| 304 | 305 |
| 305 } // namespace base | 306 } // namespace base |
| 306 | 307 |
| 307 #endif // BASE_PICKLE_H_ | 308 #endif // BASE_PICKLE_H_ |
| OLD | NEW |