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

Side by Side Diff: base/pickle.h

Issue 57783006: Revert https://src.chromium.org/viewvc/chrome?view=rev&revision=231330 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile (cc perftest). Created 7 years, 1 month 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 | Annotate | Revision Log
« 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 <string> 8 #include <string>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // Initialize a Pickle object with the specified header size in bytes, which 108 // Initialize a Pickle object with the specified header size in bytes, which
109 // must be greater-than-or-equal-to sizeof(Pickle::Header). The header size 109 // must be greater-than-or-equal-to sizeof(Pickle::Header). The header size
110 // will be rounded up to ensure that the header size is 32bit-aligned. 110 // will be rounded up to ensure that the header size is 32bit-aligned.
111 explicit Pickle(int header_size); 111 explicit Pickle(int header_size);
112 112
113 // Initializes a Pickle from a const block of data. The data is not copied; 113 // Initializes a Pickle from a const block of data. The data is not copied;
114 // instead the data is merely referenced by this Pickle. Only const methods 114 // instead the data is merely referenced by this Pickle. Only const methods
115 // should be used on the Pickle when initialized this way. The header 115 // should be used on the Pickle when initialized this way. The header
116 // padding size is deduced from the data length. 116 // padding size is deduced from the data length.
117 Pickle(const char* data, size_t data_len); 117 Pickle(const char* data, int data_len);
118 118
119 // Initializes a Pickle as a deep copy of another Pickle. 119 // Initializes a Pickle as a deep copy of another Pickle.
120 Pickle(const Pickle& other); 120 Pickle(const Pickle& other);
121 121
122 // Note: There are no virtual methods in this class. This destructor is 122 // Note: There are no virtual methods in this class. This destructor is
123 // virtual as an element of defensive coding. Other classes have derived from 123 // virtual as an element of defensive coding. Other classes have derived from
124 // this class, and there is a *chance* that they will cast into this base 124 // this class, and there is a *chance* that they will cast into this base
125 // class before destruction. At least one such class does have a virtual 125 // class before destruction. At least one such class does have a virtual
126 // destructor, suggesting at least some need to call more derived destructors. 126 // destructor, suggesting at least some need to call more derived destructors.
127 virtual ~Pickle(); 127 virtual ~Pickle();
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 339 }
340 inline void WriteBytesCommon(const void* data, size_t length); 340 inline void WriteBytesCommon(const void* data, size_t length);
341 341
342 FRIEND_TEST_ALL_PREFIXES(PickleTest, Resize); 342 FRIEND_TEST_ALL_PREFIXES(PickleTest, Resize);
343 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNext); 343 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNext);
344 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNextWithIncompleteHeader); 344 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNextWithIncompleteHeader);
345 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNextOverflow); 345 FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNextOverflow);
346 }; 346 };
347 347
348 #endif // BASE_PICKLE_H__ 348 #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