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

Issue 2049783002: Refactor OriginTrialPolicy to be an abstract interface in content/public/common (Closed)

Created:
4 years, 6 months ago by iclelland
Modified:
4 years, 6 months ago
CC:
chasej+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, jochen+watch_chromium.org, mkwst+moarreviews-shell_chromium.org, mlamouri+watch-content_chromium.org, Peter Beverloo
Base URL:
https://chromium.googlesource.com/chromium/src.git@ef-add-revoked-feature-list
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor OriginTrialPolicy to be an abstract interface in content/public/common This also changes the initialization of the OriginTrialPolicy object: it is now lazily instantiated on the ChromeContentClient when first requested. Because the object is only requested by the validator, when tokens are actually received, this means that the constructor is certain to have access to any policy provided by the browser through the command line. BUG=589830 Committed: https://crrev.com/186a896dc1d498ab89c879e795fc101a35cf9d46 Cr-Commit-Position: refs/heads/master@{#401296}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Update comment #

Patch Set 3 : Remove (c) from copyright headers on new files #

Total comments: 2

Patch Set 4 : Rebase on master, remove unneeded ctor #

Patch Set 5 : Fix comment #

Total comments: 3

Patch Set 6 : Move initialization code into ChromeOriginTrialPolicy; add non-const getter #

Patch Set 7 : Switch to lazy initialization in ChromeContentClient #

Unified diffs Side-by-side diffs Delta from patch set Stats (+253 lines, -212 lines) Patch
M chrome/app/chrome_main_delegate.cc View 1 2 3 4 5 6 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/chrome_content_client.h View 1 2 3 4 5 6 3 chunks +7 lines, -6 lines 0 comments Download
M chrome/common/chrome_content_client.cc View 1 2 3 4 5 6 2 chunks +11 lines, -2 lines 0 comments Download
A chrome/common/origin_trials/chrome_origin_trial_policy.h View 1 2 3 6 1 chunk +32 lines, -0 lines 0 comments Download
A chrome/common/origin_trials/chrome_origin_trial_policy.cc View 1 2 3 4 5 6 1 chunk +53 lines, -0 lines 0 comments Download
A + chrome/common/origin_trials/chrome_origin_trial_policy_unittest.cc View 1 2 3 3 chunks +13 lines, -13 lines 0 comments Download
D chrome/common/origin_trials/origin_trial_key_manager.h View 1 2 3 1 chunk +0 lines, -29 lines 0 comments Download
D chrome/common/origin_trials/origin_trial_key_manager.cc View 1 2 3 1 chunk +0 lines, -40 lines 0 comments Download
D chrome/common/origin_trials/origin_trial_key_manager_unittest.cc View 1 2 3 1 chunk +0 lines, -82 lines 0 comments Download
M content/common/origin_trials/trial_token_validator.cc View 1 2 3 4 5 6 2 chunks +8 lines, -2 lines 0 comments Download
M content/common/origin_trials/trial_token_validator_unittest.cc View 1 2 3 4 5 6 2 chunks +23 lines, -3 lines 0 comments Download
M content/content_shell.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/content_client.h View 1 2 3 4 5 6 2 chunks +4 lines, -3 lines 0 comments Download
M content/public/common/content_client.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
A content/public/common/origin_trial_policy.h View 1 2 3 4 5 1 chunk +23 lines, -0 lines 0 comments Download
M content/shell/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M content/shell/common/shell_content_client.h View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M content/shell/common/shell_content_client.cc View 1 2 3 4 5 6 3 chunks +3 lines, -19 lines 0 comments Download
A content/shell/common/shell_origin_trial_policy.h View 1 2 3 1 chunk +30 lines, -0 lines 0 comments Download
A content/shell/common/shell_origin_trial_policy.cc View 1 2 3 1 chunk +33 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 28 (7 generated)
iclelland
+r chasej: PTAL; this was a bigger refactor than I expected, but if should make ...
4 years, 6 months ago (2016-06-08 15:41:45 UTC) #2
chasej
lgtm, with nits. https://codereview.chromium.org/2049783002/diff/1/content/shell/common/shell_origin_trial_policy.cc File content/shell/common/shell_origin_trial_policy.cc (right): https://codereview.chromium.org/2049783002/diff/1/content/shell/common/shell_origin_trial_policy.cc#newcode13 content/shell/common/shell_origin_trial_policy.cc:13: // TODO(iclelland): Update this comment with ...
4 years, 6 months ago (2016-06-08 16:25:20 UTC) #3
iclelland
https://codereview.chromium.org/2049783002/diff/1/content/shell/common/shell_origin_trial_policy.cc File content/shell/common/shell_origin_trial_policy.cc (right): https://codereview.chromium.org/2049783002/diff/1/content/shell/common/shell_origin_trial_policy.cc#newcode13 content/shell/common/shell_origin_trial_policy.cc:13: // TODO(iclelland): Update this comment with the location of ...
4 years, 6 months ago (2016-06-08 17:44:27 UTC) #4
iclelland
jochen, can you PTAL? (Sorry for the flurry of CLs)
4 years, 6 months ago (2016-06-09 16:22:44 UTC) #6
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/2049783002/diff/40001/content/public/common/origin_trial_policy.h File content/public/common/origin_trial_policy.h (right): https://codereview.chromium.org/2049783002/diff/40001/content/public/common/origin_trial_policy.h#newcode15 content/public/common/origin_trial_policy.h:15: OriginTrialPolicy() = default; not needed?
4 years, 6 months ago (2016-06-13 15:26:43 UTC) #7
iclelland
I've rebased this onto master, and removed the code from the CL it was depending ...
4 years, 6 months ago (2016-06-15 09:43:47 UTC) #8
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2049783002/diff/80001/chrome/app/chrome_main_delegate.cc File chrome/app/chrome_main_delegate.cc (right): https://codereview.chromium.org/2049783002/diff/80001/chrome/app/chrome_main_delegate.cc#newcode639 chrome/app/chrome_main_delegate.cc:639: chrome_content_client_.InitializeOriginTrialPolicy(); chrome shouldn't call content's embedder APIs. Why aren't ...
4 years, 6 months ago (2016-06-20 11:44:56 UTC) #9
iclelland
https://codereview.chromium.org/2049783002/diff/80001/chrome/app/chrome_main_delegate.cc File chrome/app/chrome_main_delegate.cc (right): https://codereview.chromium.org/2049783002/diff/80001/chrome/app/chrome_main_delegate.cc#newcode639 chrome/app/chrome_main_delegate.cc:639: chrome_content_client_.InitializeOriginTrialPolicy(); On 2016/06/20 11:44:56, jochen wrote: > chrome shouldn't ...
4 years, 6 months ago (2016-06-20 18:08:40 UTC) #10
iclelland
https://codereview.chromium.org/2049783002/diff/80001/chrome/app/chrome_main_delegate.cc File chrome/app/chrome_main_delegate.cc (right): https://codereview.chromium.org/2049783002/diff/80001/chrome/app/chrome_main_delegate.cc#newcode639 chrome/app/chrome_main_delegate.cc:639: chrome_content_client_.InitializeOriginTrialPolicy(); On 2016/06/20 18:08:40, iclelland wrote: > On 2016/06/20 ...
4 years, 6 months ago (2016-06-21 03:33:34 UTC) #11
jochen (gone - plz use gerrit)
On 2016/06/21 at 03:33:34, iclelland wrote: > https://codereview.chromium.org/2049783002/diff/80001/chrome/app/chrome_main_delegate.cc > File chrome/app/chrome_main_delegate.cc (right): > > https://codereview.chromium.org/2049783002/diff/80001/chrome/app/chrome_main_delegate.cc#newcode639 ...
4 years, 6 months ago (2016-06-21 07:48:18 UTC) #12
iclelland
On 2016/06/21 07:48:18, jochen wrote: > On 2016/06/21 at 03:33:34, iclelland wrote: > > > ...
4 years, 6 months ago (2016-06-21 13:46:20 UTC) #13
jochen (gone - plz use gerrit)
did you mean to upload a new version?
4 years, 6 months ago (2016-06-21 14:16:54 UTC) #14
iclelland
On 2016/06/21 14:16:54, jochen wrote: > did you mean to upload a new version? No, ...
4 years, 6 months ago (2016-06-21 14:30:28 UTC) #15
iclelland
On 2016/06/21 14:30:28, iclelland wrote: > On 2016/06/21 14:16:54, jochen wrote: > > did you ...
4 years, 6 months ago (2016-06-21 15:28:49 UTC) #16
jochen (gone - plz use gerrit)
On 2016/06/21 at 15:28:49, iclelland wrote: > On 2016/06/21 14:30:28, iclelland wrote: > > On ...
4 years, 6 months ago (2016-06-22 13:25:05 UTC) #17
iclelland
On 2016/06/22 13:25:05, jochen wrote: > On 2016/06/21 at 15:28:49, iclelland wrote: > > On ...
4 years, 6 months ago (2016-06-22 13:31:13 UTC) #18
iclelland
On 2016/06/22 13:31:13, iclelland wrote: > On 2016/06/22 13:25:05, jochen wrote: > > On 2016/06/21 ...
4 years, 6 months ago (2016-06-22 14:42:43 UTC) #20
jochen (gone - plz use gerrit)
lgtm thanks for your patience as well :)
4 years, 6 months ago (2016-06-22 14:48:32 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2049783002/120001
4 years, 6 months ago (2016-06-22 16:02:00 UTC) #24
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 6 months ago (2016-06-22 16:06:37 UTC) #26
commit-bot: I haz the power
4 years, 6 months ago (2016-06-22 16:08:23 UTC) #28
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/186a896dc1d498ab89c879e795fc101a35cf9d46
Cr-Commit-Position: refs/heads/master@{#401296}

Powered by Google App Engine
This is Rietveld 408576698