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

Side by Side Diff: content/common/origin_trials/trial_token_validator.h

Issue 2116503004: Make Foreign Fetch an origin trial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 4 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_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 net {
18 class HttpResponseHeaders;
19 class URLRequest;
20 }
21
17 namespace content { 22 namespace content {
18 23
19 namespace TrialTokenValidator { 24 namespace TrialTokenValidator {
20 25
21 // If token validates, |*feature_name| is set to the name of the feature the 26 // If token validates, |*feature_name| is set to the name of the feature the
22 // token enables. 27 // token enables.
23 // This method is thread-safe. 28 // This method is thread-safe.
24 CONTENT_EXPORT blink::WebOriginTrialTokenStatus ValidateToken( 29 CONTENT_EXPORT blink::WebOriginTrialTokenStatus ValidateToken(
25 const std::string& token, 30 const std::string& token,
26 const url::Origin& origin, 31 const url::Origin& origin,
27 std::string* feature_name); 32 std::string* feature_name);
28 33
34 CONTENT_EXPORT bool RequestEnablesFeature(const net::URLRequest* request,
35 base::StringPiece feature_name);
36
37 CONTENT_EXPORT bool RequestEnablesFeature(
38 const GURL& request_url,
39 const net::HttpResponseHeaders* response_headers,
40 base::StringPiece feature_name);
41
29 } // namespace TrialTokenValidator 42 } // namespace TrialTokenValidator
30 43
31 } // namespace content 44 } // namespace content
32 45
33 #endif // CONTENT_COMMON_ORIGIN_TRIALS_TRIAL_TOKEN_VALIDATOR_H_ 46 #endif // CONTENT_COMMON_ORIGIN_TRIALS_TRIAL_TOKEN_VALIDATOR_H_
OLDNEW
« no previous file with comments | « content/browser/storage_partition_impl_map.cc ('k') | content/common/origin_trials/trial_token_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698