| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "net/cert/crl_set_storage.h" | 5 #include "net/cert/crl_set_storage.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/numerics/safe_conversions.h" | 10 #include "base/numerics/safe_conversions.h" |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 } | 285 } |
| 286 | 286 |
| 287 if (i != old_serials.size()) | 287 if (i != old_serials.size()) |
| 288 return false; | 288 return false; |
| 289 return true; | 289 return true; |
| 290 } | 290 } |
| 291 | 291 |
| 292 // static | 292 // static |
| 293 bool CRLSetStorage::Parse(base::StringPiece data, | 293 bool CRLSetStorage::Parse(base::StringPiece data, |
| 294 scoped_refptr<CRLSet>* out_crl_set) { | 294 scoped_refptr<CRLSet>* out_crl_set) { |
| 295 TRACE_EVENT0("CRLSet", "Parse"); | 295 TRACE_EVENT0("net", "CRLSetStorage::Parse"); |
| 296 // Other parts of Chrome assume that we're little endian, so we don't lose | 296 // Other parts of Chrome assume that we're little endian, so we don't lose |
| 297 // anything by doing this. | 297 // anything by doing this. |
| 298 #if defined(__BYTE_ORDER) | 298 #if defined(__BYTE_ORDER) |
| 299 // Linux check | 299 // Linux check |
| 300 static_assert(__BYTE_ORDER == __LITTLE_ENDIAN, "assumes little endian"); | 300 static_assert(__BYTE_ORDER == __LITTLE_ENDIAN, "assumes little endian"); |
| 301 #elif defined(__BIG_ENDIAN__) | 301 #elif defined(__BIG_ENDIAN__) |
| 302 // Mac check | 302 // Mac check |
| 303 #error assumes little endian | 303 #error assumes little endian |
| 304 #endif | 304 #endif |
| 305 | 305 |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 memcpy(out + off, j->data(), j->size()); | 543 memcpy(out + off, j->data(), j->size()); |
| 544 off += j->size(); | 544 off += j->size(); |
| 545 } | 545 } |
| 546 } | 546 } |
| 547 | 547 |
| 548 CHECK_EQ(off, len); | 548 CHECK_EQ(off, len); |
| 549 return ret; | 549 return ret; |
| 550 } | 550 } |
| 551 | 551 |
| 552 } // namespace net | 552 } // namespace net |
| OLD | NEW |