|
Simplify OriginTrialContext and the way it validates tokens.
The way OriginTrialContext and the WebTrialTokenValidator API was
designed made a lot of sense when the bindings were still done in such
a way that only when a feature is first used we validate if there are
tokens for that feature. But now that we check every feature in every
context the current design is both not very efficient, and also
needlessly complex.
This simplifies things a lot by validating tokens as soon as AddToken
is called (as all tokens will be validated anyway). This way we only
have to validate each token once rather than once for each feature.
Also gets rid of the old histograms as they weren't very meaningful
anymore: The FeatureEnabled was logged regardless of if a feature was
actually being used on a page, making the data hard to reason about. And
the MessageGenerated histogram was 100% NotRequested after the bindings
changes, making it not useful at all.
BUG= 627942
Committed: https://crrev.com/9d1c0acb152de57e2d1db5ca9febd3aa67664c90
Cr-Commit-Position: refs/heads/master@{#407056}
Total comments: 8
Total comments: 4
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+171 lines, -435 lines) |
Patch |
 |
M |
content/common/origin_trials/trial_token.h
|
View
|
1
|
1 chunk |
+4 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/common/origin_trials/trial_token.cc
|
View
|
|
1 chunk |
+2 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/common/origin_trials/trial_token_unittest.cc
|
View
|
|
1 chunk |
+5 lines, -20 lines |
0 comments
|
Download
|
 |
M |
content/common/origin_trials/trial_token_validator.h
|
View
|
1
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/common/origin_trials/trial_token_validator.cc
|
View
|
|
1 chunk |
+12 lines, -10 lines |
0 comments
|
Download
|
 |
M |
content/common/origin_trials/trial_token_validator_unittest.cc
|
View
|
|
1 chunk |
+23 lines, -22 lines |
0 comments
|
Download
|
 |
M |
content/renderer/origin_trials/web_trial_token_validator_impl.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/origin_trials/web_trial_token_validator_impl.cc
|
View
|
|
2 chunks |
+8 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl
|
View
|
|
1 chunk |
+3 lines, -21 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/build/scripts/templates/OriginTrials.h.tmpl
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h
|
View
|
|
2 chunks |
+5 lines, -23 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp
|
View
|
1
2
3
4
5
|
3 chunks |
+27 lines, -171 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/origin_trials/OriginTrialContextTest.cpp
|
View
|
|
5 chunks |
+27 lines, -132 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/origin_trials/testing/InternalsFrobulate.cpp
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/public/platform/WebOriginTrialTokenStatus.h
|
View
|
|
1 chunk |
+6 lines, -8 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/public/platform/WebTrialTokenValidator.h
|
View
|
1
|
1 chunk |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
tools/metrics/histograms/histograms.xml
|
View
|
1
2
3
4
5
6
|
5 chunks |
+34 lines, -0 lines |
0 comments
|
Download
|
Total messages: 44 (22 generated)
|