OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CONTENT_COMMON_ORIGIN_TRIALS_TRIAL_TOKEN_VALIDATOR_H_ | 5 #ifndef CONTENT_COMMON_ORIGIN_TRIALS_TRIAL_TOKEN_VALIDATOR_H_ |
6 #define CONTENT_COMMON_ORIGIN_TRIALS_TRIAL_TOKEN_VALIDATOR_H_ | 6 #define CONTENT_COMMON_ORIGIN_TRIALS_TRIAL_TOKEN_VALIDATOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "url/origin.h" | 11 #include "url/origin.h" |
12 | 12 |
| 13 namespace net { |
| 14 class URLRequest; |
| 15 } |
| 16 |
13 namespace content { | 17 namespace content { |
14 | 18 |
15 namespace TrialTokenValidator { | 19 namespace TrialTokenValidator { |
16 | 20 |
17 // This method is thread-safe. | 21 // This method is thread-safe. |
18 CONTENT_EXPORT bool ValidateToken(const std::string& token, | 22 CONTENT_EXPORT bool ValidateToken(const std::string& token, |
19 const url::Origin& origin, | 23 const url::Origin& origin, |
20 base::StringPiece featureName); | 24 base::StringPiece featureName); |
21 | 25 |
| 26 CONTENT_EXPORT bool RequestEnablesFeature(const net::URLRequest* request, |
| 27 base::StringPiece featureName); |
| 28 |
22 } // namespace TrialTokenValidator | 29 } // namespace TrialTokenValidator |
23 | 30 |
24 } // namespace content | 31 } // namespace content |
25 | 32 |
26 #endif // CONTENT_COMMON_ORIGIN_TRIALS_TRIAL_TOKEN_VALIDATOR_H_ | 33 #endif // CONTENT_COMMON_ORIGIN_TRIALS_TRIAL_TOKEN_VALIDATOR_H_ |
OLD | NEW |