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

Issue 1752463002: Cleanup TrialToken in preparation of moving it to content/common. (Closed)

Created:
4 years, 9 months ago by Marijn Kruisselbrink
Modified:
4 years, 9 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, chasej+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cleanup TrialToken in preparation of moving it to content/common. This includes the following cleanups: - Pass StringPiece by value rather than const ref, as its documentation suggests. - Represent origins as url::Origin/blink::WebSecurityOrigin. - Pass feature_name to TrialToken::IsAppropriate and related methods as StringPiece. Currently doesn't make a difference yet as TrialTokenValidator still converts through std::string, but that can be fixed, and new content side code can avoid having to construct strings for feature names this way. - Store expiry time as base::Time instead of raw int64. Under the hood a base::Time is an int64 anyway, so this just moves the conversion from int64 to base::Time earlier, making the code more accurately reflect what it represents. - C-style cast in passing int64 to base::Time::FromDoubleT is against the style guide, and unnecessary since this is done implicitly by the compiler. - Fix order of methods in trial_token.cc to match that in trial_token.h - Use correct style for argument names in trial_token.h (featureName => feature_name). BUG=590873 Committed: https://crrev.com/6cad14e7709b9578100415a641ec1ea3f0268e27 Cr-Commit-Position: refs/heads/master@{#380537}

Patch Set 1 #

Total comments: 6

Patch Set 2 : remove unneeded includes #

Patch Set 3 : no more TrialToken::Verify #

Patch Set 4 : rebase #

Total comments: 4

Patch Set 5 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -79 lines) Patch
M content/renderer/origin_trials/trial_token.h View 1 2 3 chunks +14 lines, -16 lines 0 comments Download
M content/renderer/origin_trials/trial_token.cc View 1 2 3 4 3 chunks +26 lines, -26 lines 0 comments Download
M content/renderer/origin_trials/trial_token_unittest.cc View 1 2 6 chunks +23 lines, -17 lines 0 comments Download
M content/renderer/origin_trials/trial_token_validator.h View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/origin_trials/trial_token_validator.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/origin_trials/trial_token_validator_unittest.cc View 4 chunks +16 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp View 1 2 3 4 2 chunks +2 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/origin_trials/OriginTrialContextTest.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/platform/WebTrialTokenValidator.h View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 39 (20 generated)
Marijn Kruisselbrink
4 years, 9 months ago (2016-02-29 22:07:03 UTC) #6
iclelland
ALl of this looks pretty good -- I'm just not sure about the reasoning behind ...
4 years, 9 months ago (2016-03-02 22:36:29 UTC) #8
Marijn Kruisselbrink
https://codereview.chromium.org/1752463002/diff/20001/content/renderer/origin_trials/trial_token.cc File content/renderer/origin_trials/trial_token.cc (right): https://codereview.chromium.org/1752463002/diff/20001/content/renderer/origin_trials/trial_token.cc#newcode98 content/renderer/origin_trials/trial_token.cc:98: ContentClient* content_client = GetContentClient(); On 2016/03/02 at 22:36:29, iclelland ...
4 years, 9 months ago (2016-03-02 22:43:12 UTC) #9
Marijn Kruisselbrink
In the latest version of this CL I undid the changes to add TrialToken::Verify. I'll ...
4 years, 9 months ago (2016-03-03 23:59:26 UTC) #12
iclelland
On 2016/03/03 23:59:26, Marijn Kruisselbrink wrote: > In the latest version of this CL I ...
4 years, 9 months ago (2016-03-04 14:19:47 UTC) #13
Marijn Kruisselbrink
+jam for content/ OWNERS +rbyers for third_party/WebKit OWNERS
4 years, 9 months ago (2016-03-08 20:25:02 UTC) #15
Rick Byers
On 2016/03/08 20:25:02, Marijn Kruisselbrink wrote: > +jam for content/ OWNERS > +rbyers for third_party/WebKit ...
4 years, 9 months ago (2016-03-08 20:48:06 UTC) #16
Marijn Kruisselbrink
+avi for content/ OWNERS
4 years, 9 months ago (2016-03-10 22:28:14 UTC) #18
Avi (use Gerrit)
lgtm nits https://codereview.chromium.org/1752463002/diff/100001/content/renderer/origin_trials/trial_token.cc File content/renderer/origin_trials/trial_token.cc (left): https://codereview.chromium.org/1752463002/diff/100001/content/renderer/origin_trials/trial_token.cc#oldcode113 content/renderer/origin_trials/trial_token.cc:113: // active keys here. https://crbug.com/543220 Is the ...
4 years, 9 months ago (2016-03-10 22:55:29 UTC) #19
Marijn Kruisselbrink
https://codereview.chromium.org/1752463002/diff/100001/content/renderer/origin_trials/trial_token.cc File content/renderer/origin_trials/trial_token.cc (left): https://codereview.chromium.org/1752463002/diff/100001/content/renderer/origin_trials/trial_token.cc#oldcode113 content/renderer/origin_trials/trial_token.cc:113: // active keys here. https://crbug.com/543220 On 2016/03/10 at 22:55:29, ...
4 years, 9 months ago (2016-03-11 00:07:33 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1752463002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1752463002/140001
4 years, 9 months ago (2016-03-11 00:12:27 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/129157)
4 years, 9 months ago (2016-03-11 00:43:34 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1752463002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1752463002/140001
4 years, 9 months ago (2016-03-11 00:48:27 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/129237)
4 years, 9 months ago (2016-03-11 01:25:50 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1752463002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1752463002/140001
4 years, 9 months ago (2016-03-11 04:05:47 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/180105)
4 years, 9 months ago (2016-03-11 04:55:00 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1752463002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1752463002/140001
4 years, 9 months ago (2016-03-11 04:57:05 UTC) #36
commit-bot: I haz the power
Committed patchset #5 (id:140001)
4 years, 9 months ago (2016-03-11 05:36:38 UTC) #37
commit-bot: I haz the power
4 years, 9 months ago (2016-03-11 05:38:07 UTC) #39
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/6cad14e7709b9578100415a641ec1ea3f0268e27
Cr-Commit-Position: refs/heads/master@{#380537}

Powered by Google App Engine
This is Rietveld 408576698