OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/origin_trials/trial_token.h" | 5 #include "content/common/origin_trials/trial_token.h" |
6 | 6 |
7 #include <openssl/curve25519.h> | |
8 | |
9 #include <vector> | 7 #include <vector> |
10 | 8 |
11 #include "base/base64.h" | 9 #include "base/base64.h" |
12 #include "base/big_endian.h" | 10 #include "base/big_endian.h" |
13 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
14 #include "base/macros.h" | 12 #include "base/macros.h" |
15 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
16 #include "base/strings/string_piece.h" | 14 #include "base/strings/string_piece.h" |
17 #include "base/time/time.h" | 15 #include "base/time/time.h" |
18 #include "base/values.h" | 16 #include "base/values.h" |
19 #include "third_party/WebKit/public/platform/WebOriginTrialTokenStatus.h" | 17 #include "third_party/WebKit/public/platform/WebOriginTrialTokenStatus.h" |
| 18 #include "third_party/boringssl/src/include/openssl/curve25519.h" |
20 #include "url/gurl.h" | 19 #include "url/gurl.h" |
21 #include "url/origin.h" | 20 #include "url/origin.h" |
22 | 21 |
23 namespace content { | 22 namespace content { |
24 | 23 |
25 namespace { | 24 namespace { |
26 | 25 |
27 // Version is a 1-byte field at offset 0. | 26 // Version is a 1-byte field at offset 0. |
28 const size_t kVersionOffset = 0; | 27 const size_t kVersionOffset = 0; |
29 const size_t kVersionSize = 1; | 28 const size_t kVersionSize = 1; |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 TrialToken::TrialToken(const url::Origin& origin, | 217 TrialToken::TrialToken(const url::Origin& origin, |
219 bool match_subdomains, | 218 bool match_subdomains, |
220 const std::string& feature_name, | 219 const std::string& feature_name, |
221 uint64_t expiry_timestamp) | 220 uint64_t expiry_timestamp) |
222 : origin_(origin), | 221 : origin_(origin), |
223 match_subdomains_(match_subdomains), | 222 match_subdomains_(match_subdomains), |
224 feature_name_(feature_name), | 223 feature_name_(feature_name), |
225 expiry_time_(base::Time::FromDoubleT(expiry_timestamp)) {} | 224 expiry_time_(base::Time::FromDoubleT(expiry_timestamp)) {} |
226 | 225 |
227 } // namespace content | 226 } // namespace content |
OLD | NEW |