Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: content/renderer/origin_trials/web_trial_token_validator_impl.h

Issue 2123323004: Simplify OriginTrialContext and the way it validates tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark enum as obsolete Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 Origin Trials Framework code in 16 // The TrialTokenValidator is called by the Origin Trials Framework code in
17 // Blink to validate tokens to enable experimental features. 17 // Blink to validate tokens to enable experimental features.
18 // 18 //
19 // This class is thread-safe. 19 // This class is thread-safe.
20 class CONTENT_EXPORT WebTrialTokenValidatorImpl 20 class CONTENT_EXPORT WebTrialTokenValidatorImpl
21 : public NON_EXPORTED_BASE(blink::WebTrialTokenValidator) { 21 : public NON_EXPORTED_BASE(blink::WebTrialTokenValidator) {
22 public: 22 public:
23 WebTrialTokenValidatorImpl(); 23 WebTrialTokenValidatorImpl();
24 ~WebTrialTokenValidatorImpl() override; 24 ~WebTrialTokenValidatorImpl() override;
25 25
26 // blink::WebTrialTokenValidator implementation 26 // blink::WebTrialTokenValidator implementation
27 blink::WebOriginTrialTokenStatus validateToken( 27 blink::WebOriginTrialTokenStatus validateToken(
28 const blink::WebString& token, 28 const blink::WebString& token,
29 const blink::WebSecurityOrigin& origin, 29 const blink::WebSecurityOrigin& origin,
30 const blink::WebString& featureName) override; 30 blink::WebString* feature_name) override;
31 31
32 private: 32 private:
33 DISALLOW_COPY_AND_ASSIGN(WebTrialTokenValidatorImpl); 33 DISALLOW_COPY_AND_ASSIGN(WebTrialTokenValidatorImpl);
34 }; 34 };
35 35
36 } // namespace content 36 } // namespace content
37 37
38 #endif // CONTENT_RENDERER_ORIGIN_TRIALS_WEB_TRIAL_TOKEN_VALIDATOR_IMPL_H_ 38 #endif // CONTENT_RENDERER_ORIGIN_TRIALS_WEB_TRIAL_TOKEN_VALIDATOR_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698