Chromium Code Reviews| 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_RENDERER_ORIGIN_TRIALS_WEB_TRIAL_TOKEN_VALIDATOR_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_ORIGIN_TRIALS_WEB_TRIAL_TOKEN_VALIDATOR_IMPL_H_ |
| 6 #define CONTENT_RENDERER_ORIGIN_TRIALS_WEB_TRIAL_TOKEN_VALIDATOR_IMPL_H_ | 6 #define CONTENT_RENDERER_ORIGIN_TRIALS_WEB_TRIAL_TOKEN_VALIDATOR_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "third_party/WebKit/public/platform/WebTrialTokenValidator.h" | 12 #include "third_party/WebKit/public/platform/WebTrialTokenValidator.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 // The TrialTokenValidator is called by the Experimental Framework code in Blink | 16 enum class WebOriginTrialTokenStatus; |
|
iclelland
2016/04/28 17:00:58
wrap this in "namespace blink" instead, if you nee
chasej
2016/05/02 15:53:11
Wasn't needed, so just removed the declaration.
| |
| 17 // to validate tokens to enable experimental features. | 17 |
| 18 // The TrialTokenValidator is called by the Origin Trials Framework code in | |
| 19 // Blink to validate tokens to enable experimental features. | |
| 18 // | 20 // |
| 19 // This class is thread-safe. | 21 // This class is thread-safe. |
| 20 class CONTENT_EXPORT WebTrialTokenValidatorImpl | 22 class CONTENT_EXPORT WebTrialTokenValidatorImpl |
| 21 : public NON_EXPORTED_BASE(blink::WebTrialTokenValidator) { | 23 : public NON_EXPORTED_BASE(blink::WebTrialTokenValidator) { |
| 22 public: | 24 public: |
| 23 WebTrialTokenValidatorImpl(); | 25 WebTrialTokenValidatorImpl(); |
| 24 ~WebTrialTokenValidatorImpl() override; | 26 ~WebTrialTokenValidatorImpl() override; |
| 25 | 27 |
| 26 // blink::WebTrialTokenValidator implementation | 28 // blink::WebTrialTokenValidator implementation |
| 27 bool validateToken(const blink::WebString& token, | 29 blink::WebOriginTrialTokenStatus validateToken( |
| 28 const blink::WebSecurityOrigin& origin, | 30 const blink::WebString& token, |
| 29 const blink::WebString& featureName) override; | 31 const blink::WebSecurityOrigin& origin, |
| 32 const blink::WebString& featureName) override; | |
| 30 | 33 |
| 31 private: | 34 private: |
| 32 DISALLOW_COPY_AND_ASSIGN(WebTrialTokenValidatorImpl); | 35 DISALLOW_COPY_AND_ASSIGN(WebTrialTokenValidatorImpl); |
| 33 }; | 36 }; |
| 34 | 37 |
| 35 } // namespace content | 38 } // namespace content |
| 36 | 39 |
| 37 #endif // CONTENT_RENDERER_ORIGIN_TRIALS_WEB_TRIAL_TOKEN_VALIDATOR_IMPL_H_ | 40 #endif // CONTENT_RENDERER_ORIGIN_TRIALS_WEB_TRIAL_TOKEN_VALIDATOR_IMPL_H_ |
| OLD | NEW |