| OLD | NEW |
| 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 #include "content/common/ssl_status_serialization.h" | 5 #include "content/common/ssl_status_serialization.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/pickle.h" | 8 #include "base/pickle.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // No SSL used. | 31 // No SSL used. |
| 32 *cert_id = 0; | 32 *cert_id = 0; |
| 33 // The following are not applicable and are set to the default values. | 33 // The following are not applicable and are set to the default values. |
| 34 *cert_status = 0; | 34 *cert_status = 0; |
| 35 *security_bits = -1; | 35 *security_bits = -1; |
| 36 *ssl_connection_status = 0; | 36 *ssl_connection_status = 0; |
| 37 return false; | 37 return false; |
| 38 } | 38 } |
| 39 | 39 |
| 40 Pickle pickle(state.data(), static_cast<int>(state.size())); | 40 Pickle pickle(state.data(), static_cast<int>(state.size())); |
| 41 void * iter = NULL; | 41 PickleIterator iter(pickle); |
| 42 return pickle.ReadInt(&iter, cert_id) && | 42 return pickle.ReadInt(&iter, cert_id) && |
| 43 pickle.ReadUInt32(&iter, cert_status) && | 43 pickle.ReadUInt32(&iter, cert_status) && |
| 44 pickle.ReadInt(&iter, security_bits) && | 44 pickle.ReadInt(&iter, security_bits) && |
| 45 pickle.ReadInt(&iter, ssl_connection_status); | 45 pickle.ReadInt(&iter, ssl_connection_status); |
| 46 } | 46 } |
| 47 | 47 |
| 48 } // namespace content | 48 } // namespace content |
| OLD | NEW |