| 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 blink { | 13 namespace blink { |
| 14 enum class WebOriginTrialTokenStatus; | 14 enum class WebOriginTrialTokenStatus; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 | 18 |
| 19 namespace TrialTokenValidator { | 19 namespace TrialTokenValidator { |
| 20 | 20 |
| 21 // If token validates, |*feature_name| is set to the name of the feature the |
| 22 // token enables. |
| 21 // This method is thread-safe. | 23 // This method is thread-safe. |
| 22 CONTENT_EXPORT blink::WebOriginTrialTokenStatus ValidateToken( | 24 CONTENT_EXPORT blink::WebOriginTrialTokenStatus ValidateToken( |
| 23 const std::string& token, | 25 const std::string& token, |
| 24 const url::Origin& origin, | 26 const url::Origin& origin, |
| 25 base::StringPiece feature_name); | 27 std::string* feature_name); |
| 26 | 28 |
| 27 } // namespace TrialTokenValidator | 29 } // namespace TrialTokenValidator |
| 28 | 30 |
| 29 } // namespace content | 31 } // namespace content |
| 30 | 32 |
| 31 #endif // CONTENT_COMMON_ORIGIN_TRIALS_TRIAL_TOKEN_VALIDATOR_H_ | 33 #endif // CONTENT_COMMON_ORIGIN_TRIALS_TRIAL_TOKEN_VALIDATOR_H_ |
| OLD | NEW |