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