[go: nahoru, domu]

Remove unused IPC::Message priority.

Removes the PriorityValue enum and field from IPC::Message. This doesn't
appear to be used anywhere.

Changes the data message ctor to take a size_t data_len parameter.  This
works around an ambiguity problem with the main ctor, which has a similar
signature and would require lots of futzing with our test code to fix. To
make this work, the matching Pickle constructor is also changed to take a
size_t data_len parameter.

BUG=194304

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231330 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/base/pickle.cc b/base/pickle.cc
index af3191b..1d300b9 100644
--- a/base/pickle.cc
+++ b/base/pickle.cc
@@ -170,15 +170,15 @@
   header_->payload_size = 0;
 }
 
-Pickle::Pickle(const char* data, int data_len)
+Pickle::Pickle(const char* data, size_t data_len)
     : header_(reinterpret_cast<Header*>(const_cast<char*>(data))),
       header_size_(0),
       capacity_(kCapacityReadOnly),
       variable_buffer_offset_(0) {
-  if (data_len >= static_cast<int>(sizeof(Header)))
+  if (data_len >= sizeof(Header))
     header_size_ = data_len - header_->payload_size;
 
-  if (header_size_ > static_cast<unsigned int>(data_len))
+  if (header_size_ > data_len)
     header_size_ = 0;
 
   if (header_size_ != AlignInt(header_size_, sizeof(uint32)))