OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ct_serialization.h" | 5 #include "net/cert/ct_serialization.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
347 log_id.CopyToString(&result.log_id); | 347 log_id.CopyToString(&result.log_id); |
348 extensions.CopyToString(&result.extensions); | 348 extensions.CopyToString(&result.extensions); |
349 result.timestamp = | 349 result.timestamp = |
350 base::Time::UnixEpoch() + | 350 base::Time::UnixEpoch() + |
351 base::TimeDelta::FromMilliseconds(static_cast<int64>(timestamp)); | 351 base::TimeDelta::FromMilliseconds(static_cast<int64>(timestamp)); |
352 | 352 |
353 *output = result; | 353 *output = result; |
354 return true; | 354 return true; |
355 } | 355 } |
356 | 356 |
357 bool EncodeSCTListForTesting(const base::StringPiece& sct, | |
358 std::string* output) { | |
359 std::string encoded_sct; | |
360 return WriteVariableBytes(kSerializedSCTLengthBytes, sct, &encoded_sct) && | |
361 WriteVariableBytes(kSCTListLengthBytes, encoded_sct, output); | |
Ryan Sleevi
2013/11/20 01:09:42
style nit: indent 4 spaces (or use clang-format /
Eran M. (Google)
2013/11/20 19:45:06
Done.
| |
362 } | |
363 | |
357 } // namespace ct | 364 } // namespace ct |
358 | 365 |
359 } // namespace net | 366 } // namespace net |
OLD | NEW |