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

Unified Diff: base/pickle.h

Issue 1149113006: Move Pickle to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/metrics/sparse_histogram.h ('k') | base/pickle_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/pickle.h
diff --git a/base/pickle.h b/base/pickle.h
index 9589e2aadad41c05e60d95baddde12e0c157d86e..05d791993ad87bb5c54dd35cb449334070bb0c7a 100644
--- a/base/pickle.h
+++ b/base/pickle.h
@@ -15,6 +15,8 @@
#include "base/strings/string16.h"
#include "base/strings/string_piece.h"
+namespace base {
+
class Pickle;
// PickleIterator reads data from a Pickle. The Pickle object must remain valid
@@ -41,10 +43,10 @@ class BASE_EXPORT PickleIterator {
bool ReadDouble(double* result) WARN_UNUSED_RESULT;
bool ReadString(std::string* result) WARN_UNUSED_RESULT;
// The StringPiece data will only be valid for the lifetime of the message.
- bool ReadStringPiece(base::StringPiece* result) WARN_UNUSED_RESULT;
- bool ReadString16(base::string16* result) WARN_UNUSED_RESULT;
+ bool ReadStringPiece(StringPiece* result) WARN_UNUSED_RESULT;
+ bool ReadString16(string16* result) WARN_UNUSED_RESULT;
// The StringPiece16 data will only be valid for the lifetime of the message.
- bool ReadStringPiece16(base::StringPiece16* result) WARN_UNUSED_RESULT;
+ bool ReadStringPiece16(StringPiece16* result) WARN_UNUSED_RESULT;
// A pointer to the data will be placed in |*data|, and the length will be
// placed in |*length|. The pointer placed into |*data| points into the
@@ -199,8 +201,8 @@ class BASE_EXPORT Pickle {
bool WriteDouble(double value) {
return WritePOD(value);
}
- bool WriteString(const base::StringPiece& value);
- bool WriteString16(const base::StringPiece16& value);
+ bool WriteString(const StringPiece& value);
+ bool WriteString16(const StringPiece16& value);
// "Data" is a blob with a length. When you read it out you will be given the
// length. See also WriteBytes.
bool WriteData(const char* data, int length);
@@ -304,4 +306,10 @@ class BASE_EXPORT Pickle {
FRIEND_TEST_ALL_PREFIXES(PickleTest, FindNextOverflow);
};
+} // namespace base
+
+// TODO(brettw) remove these when callers have been updated.
+using base::Pickle;
+using base::PickleIterator;
+
#endif // BASE_PICKLE_H_
« no previous file with comments | « base/metrics/sparse_histogram.h ('k') | base/pickle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698