Index: crypto/secure_hash_default.cc |
diff --git a/crypto/secure_hash_default.cc b/crypto/secure_hash_default.cc |
index 6607dfe27410824e93c1e2643a9d2647e4b77f01..834a276fbf9394541aa52dd37f628bdcfeb1ba39 100644 |
--- a/crypto/secure_hash_default.cc |
+++ b/crypto/secure_hash_default.cc |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -36,7 +36,7 @@ class SecureHashSHA256NSS : public SecureHash { |
} |
virtual bool Serialize(Pickle* pickle); |
- virtual bool Deserialize(void** data_iterator, Pickle* pickle); |
+ virtual bool Deserialize(PickleIterator* data_iterator); |
private: |
SHA256Context ctx_; |
@@ -55,26 +55,23 @@ bool SecureHashSHA256NSS::Serialize(Pickle* pickle) { |
return true; |
} |
-bool SecureHashSHA256NSS::Deserialize(void** data_iterator, Pickle* pickle) { |
- if (!pickle) |
- return false; |
- |
+bool SecureHashSHA256NSS::Deserialize(PickleIterator* data_iterator) { |
int version; |
- if (!pickle->ReadInt(data_iterator, &version)) |
+ if (!data_iterator->ReadInt(&version)) |
return false; |
if (version > kSecureHashVersion) |
return false; // We don't know how to deal with this. |
std::string type; |
- if (!pickle->ReadString(data_iterator, &type)) |
+ if (!data_iterator->ReadString(&type)) |
return false; |
if (type != kSHA256Descriptor) |
return false; // It's the wrong kind. |
const char* data = NULL; |
- if (!pickle->ReadBytes(data_iterator, &data, sizeof(ctx_))) |
+ if (!data_iterator->ReadBytes(&data, sizeof(ctx_))) |
return false; |
memcpy(&ctx_, data, sizeof(ctx_)); |