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

Side by Side Diff: base/pickle.h

Issue 1966983003: Generate param traits size methods for IPC files in content/ (and traits it depends on). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix owners Created 4 years, 7 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 | « no previous file | base/pickle.cc » ('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 #ifndef BASE_PICKLE_H_ 5 #ifndef BASE_PICKLE_H_
6 #define BASE_PICKLE_H_ 6 #define BASE_PICKLE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void AddUInt16() { return AddPOD<uint16_t>(); } 125 void AddUInt16() { return AddPOD<uint16_t>(); }
126 void AddUInt32() { return AddPOD<uint32_t>(); } 126 void AddUInt32() { return AddPOD<uint32_t>(); }
127 void AddInt64() { return AddPOD<int64_t>(); } 127 void AddInt64() { return AddPOD<int64_t>(); }
128 void AddUInt64() { return AddPOD<uint64_t>(); } 128 void AddUInt64() { return AddPOD<uint64_t>(); }
129 void AddFloat() { return AddPOD<float>(); } 129 void AddFloat() { return AddPOD<float>(); }
130 void AddDouble() { return AddPOD<double>(); } 130 void AddDouble() { return AddPOD<double>(); }
131 void AddString(const StringPiece& value); 131 void AddString(const StringPiece& value);
132 void AddString16(const StringPiece16& value); 132 void AddString16(const StringPiece16& value);
133 void AddData(int length); 133 void AddData(int length);
134 void AddBytes(int length); 134 void AddBytes(int length);
135 void AddAttachment();
135 136
136 private: 137 private:
137 // Just like AddBytes() but with a compile-time size for performance. 138 // Just like AddBytes() but with a compile-time size for performance.
138 template<size_t length> void BASE_EXPORT AddBytesStatic(); 139 template<size_t length> void BASE_EXPORT AddBytesStatic();
139 140
140 template <typename T> 141 template <typename T>
141 void AddPOD() { AddBytesStatic<sizeof(T)>(); } 142 void AddPOD() { AddBytesStatic<sizeof(T)>(); }
142 143
143 size_t payload_size_ = 0; 144 size_t payload_size_ = 0;
144 }; 145 };
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 FRIEND_TEST_ALL_PREFIXES(PickleTest, PeekNext); 376 FRIEND_TEST_ALL_PREFIXES(PickleTest, PeekNext);
376 FRIEND_TEST_ALL_PREFIXES(PickleTest, PeekNextOverflow); 377 FRIEND_TEST_ALL_PREFIXES(PickleTest, PeekNextOverflow);
377 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNext); 378 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNext);
378 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNextWithIncompleteHeader); 379 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNextWithIncompleteHeader);
379 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNextOverflow); 380 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNextOverflow);
380 }; 381 };
381 382
382 } // namespace base 383 } // namespace base
383 384
384 #endif // BASE_PICKLE_H_ 385 #endif // BASE_PICKLE_H_
OLDNEW
« no previous file with comments | « no previous file | base/pickle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698