Move Pickle to base namespace.

Updates forward-declares and headers, but keeps a using statement in to avoid updating all users atomically.

TBR=jschuh for IPC stuff

Review URL: https://codereview.chromium.org/1149113006

Cr-Commit-Position: refs/heads/master@{#332352}
diff --git a/base/pickle.h b/base/pickle.h
index 9589e2aa..05d7919 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 @@
   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 @@
   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 @@
   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_