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

Issue 2847853003: Remove policy watching from It2MeHost. (Closed)

Created:
3 years, 7 months ago by Jamie
Modified:
3 years, 7 months ago
Reviewers:
rkjnsn, Devlin, *joedow
CC:
chromium-reviews, chromoting-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove policy watching from It2MeHost. This functionality is already present in It2MeNativeMessagingHost, which owns the It2MeHost and can simply forward the policy changes to it. This CL is part of a larger change to make the It2Me host react to policy errors, at which point it will be more convenient to have a single policy watcher. BUG=433009 Review-Url: https://codereview.chromium.org/2847853003 Cr-Commit-Position: refs/heads/master@{#469834} Committed: https://chromium.googlesource.com/chromium/src/+/cf2cc68d4e6a4a70bcadfd5491f90d119129ec38

Patch Set 1 #

Patch Set 2 : Handle policies read before the host starts. #

Patch Set 3 : Remove pending policies from It2MeNativeMessagingHost and add an accessor to PolicyWatcher. #

Total comments: 12

Patch Set 4 : Reviewer feedback. #

Patch Set 5 : Fix unit test. #

Patch Set 6 : Rebase #

Patch Set 7 : Supply default policy values for tests unless overridden. #

Patch Set 8 : Fix unit tests #

Total comments: 9

Patch Set 9 : Reviewer feedback. #

Total comments: 2

Patch Set 10 : Allow PolicyWatcher to be injected into It2MeNativeMessagingHost. #

Total comments: 2

Patch Set 11 : Don't read real policies. #

Total comments: 15

Patch Set 12 : Reviewer feedback. #

Patch Set 13 : Reviewer feedback. #

Patch Set 14 : Fix ChromeOS compile. #

Patch Set 15 : Fix DEPS #

Patch Set 16 : Add dep. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -185 lines) Patch
M chrome/browser/extensions/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -2 lines 0 comments Download
M remoting/host/it2me/it2me_host.h View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +3 lines, -19 lines 0 comments Download
M remoting/host/it2me/it2me_host.cc View 1 2 3 4 5 6 7 8 9 8 chunks +3 lines, -24 lines 0 comments Download
M remoting/host/it2me/it2me_host_unittest.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -17 lines 0 comments Download
M remoting/host/it2me/it2me_native_messaging_host.h View 1 2 3 4 5 6 7 8 9 3 chunks +2 lines, -4 lines 0 comments Download
M remoting/host/it2me/it2me_native_messaging_host.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +30 lines, -28 lines 0 comments Download
M remoting/host/it2me/it2me_native_messaging_host_main.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -1 line 0 comments Download
M remoting/host/it2me/it2me_native_messaging_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 10 chunks +18 lines, -66 lines 0 comments Download
M remoting/host/policy_watcher.h View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M remoting/host/policy_watcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +33 lines, -24 lines 0 comments Download
M remoting/host/policy_watcher_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +15 lines, -0 lines 0 comments Download

Messages

Total messages: 52 (19 generated)
Jamie
Joe, PTAL Erik, FYI in case you have comments based on your previous work in ...
3 years, 7 months ago (2017-04-28 17:52:41 UTC) #3
rkjnsn
Haven't looked in detail, yet, but a couple initial comments. https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc File remoting/host/it2me/it2me_host_unittest.cc (right): https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc#newcode222 ...
3 years, 7 months ago (2017-04-28 21:15:36 UTC) #4
joedow
https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc File remoting/host/it2me/it2me_host_unittest.cc (right): https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc#newcode226 remoting/host/it2me/it2me_host_unittest.cc:226: it2me_host_->OnPolicyUpdate(std::move(dictionary)); On 2017/04/28 21:15:36, rkjnsn wrote: > Note that ...
3 years, 7 months ago (2017-04-28 21:46:32 UTC) #5
Jamie
PTAL https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc File remoting/host/it2me/it2me_host_unittest.cc (right): https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc#newcode222 remoting/host/it2me/it2me_host_unittest.cc:222: std::unique_ptr<base::DictionaryValue> dictionary(new base::DictionaryValue); On 2017/04/28 21:15:36, rkjnsn wrote: ...
3 years, 7 months ago (2017-04-28 22:41:10 UTC) #6
rkjnsn
https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc File remoting/host/it2me/it2me_host_unittest.cc (right): https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc#newcode226 remoting/host/it2me/it2me_host_unittest.cc:226: it2me_host_->OnPolicyUpdate(std::move(dictionary)); On 2017/04/28 22:41:09, Jamie wrote: > On 2017/04/28 ...
3 years, 7 months ago (2017-05-02 19:19:12 UTC) #7
Jamie
https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc File remoting/host/it2me/it2me_host_unittest.cc (right): https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc#newcode226 remoting/host/it2me/it2me_host_unittest.cc:226: it2me_host_->OnPolicyUpdate(std::move(dictionary)); On 2017/05/02 19:19:12, rkjnsn wrote: > On 2017/04/28 ...
3 years, 7 months ago (2017-05-02 22:07:57 UTC) #8
rkjnsn
https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc File remoting/host/it2me/it2me_host_unittest.cc (right): https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc#newcode226 remoting/host/it2me/it2me_host_unittest.cc:226: it2me_host_->OnPolicyUpdate(std::move(dictionary)); On 2017/05/02 22:07:56, Jamie wrote: > On 2017/05/02 ...
3 years, 7 months ago (2017-05-02 23:20:19 UTC) #9
rkjnsn
https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc File remoting/host/it2me/it2me_host_unittest.cc (right): https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc#newcode226 remoting/host/it2me/it2me_host_unittest.cc:226: it2me_host_->OnPolicyUpdate(std::move(dictionary)); On 2017/05/02 23:20:19, rkjnsn wrote: > I mostly ...
3 years, 7 months ago (2017-05-02 23:27:19 UTC) #10
Jamie
https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc File remoting/host/it2me/it2me_host_unittest.cc (right): https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc#newcode226 remoting/host/it2me/it2me_host_unittest.cc:226: it2me_host_->OnPolicyUpdate(std::move(dictionary)); On 2017/05/02 23:27:19, rkjnsn wrote: > On 2017/05/02 ...
3 years, 7 months ago (2017-05-02 23:49:03 UTC) #11
Jamie
PTAL https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc File remoting/host/it2me/it2me_host_unittest.cc (right): https://codereview.chromium.org/2847853003/diff/40001/remoting/host/it2me/it2me_host_unittest.cc#newcode226 remoting/host/it2me/it2me_host_unittest.cc:226: it2me_host_->OnPolicyUpdate(std::move(dictionary)); On 2017/05/02 23:49:03, Jamie wrote: > On ...
3 years, 7 months ago (2017-05-03 20:41:04 UTC) #12
rkjnsn
https://codereview.chromium.org/2847853003/diff/140001/remoting/host/it2me/it2me_native_messaging_host.cc File remoting/host/it2me/it2me_native_messaging_host.cc (right): https://codereview.chromium.org/2847853003/diff/140001/remoting/host/it2me/it2me_native_messaging_host.cc#newcode474 remoting/host/it2me/it2me_native_messaging_host.cc:474: // way to communicate changes to the user. Out ...
3 years, 7 months ago (2017-05-03 21:31:48 UTC) #13
Jamie
PTAL https://codereview.chromium.org/2847853003/diff/140001/remoting/host/it2me/it2me_native_messaging_host.cc File remoting/host/it2me/it2me_native_messaging_host.cc (right): https://codereview.chromium.org/2847853003/diff/140001/remoting/host/it2me/it2me_native_messaging_host.cc#newcode474 remoting/host/it2me/it2me_native_messaging_host.cc:474: // way to communicate changes to the user. ...
3 years, 7 months ago (2017-05-03 23:41:10 UTC) #14
joedow
https://codereview.chromium.org/2847853003/diff/140001/remoting/host/it2me/it2me_native_messaging_host.cc File remoting/host/it2me/it2me_native_messaging_host.cc (right): https://codereview.chromium.org/2847853003/diff/140001/remoting/host/it2me/it2me_native_messaging_host.cc#newcode474 remoting/host/it2me/it2me_native_messaging_host.cc:474: // way to communicate changes to the user. On ...
3 years, 7 months ago (2017-05-04 17:24:22 UTC) #15
rkjnsn
https://codereview.chromium.org/2847853003/diff/140001/remoting/host/it2me/it2me_native_messaging_host.cc File remoting/host/it2me/it2me_native_messaging_host.cc (right): https://codereview.chromium.org/2847853003/diff/140001/remoting/host/it2me/it2me_native_messaging_host.cc#newcode474 remoting/host/it2me/it2me_native_messaging_host.cc:474: // way to communicate changes to the user. On ...
3 years, 7 months ago (2017-05-04 20:45:46 UTC) #16
Jamie
https://codereview.chromium.org/2847853003/diff/160001/remoting/host/it2me/it2me_native_messaging_host.cc File remoting/host/it2me/it2me_native_messaging_host.cc (right): https://codereview.chromium.org/2847853003/diff/160001/remoting/host/it2me/it2me_native_messaging_host.cc#newcode323 remoting/host/it2me/it2me_native_messaging_host.cc:323: it2me_host_->OnPolicyUpdate(policy_watcher_->GetCurrentPolicies()); On 2017/05/04 20:45:45, rkjnsn wrote: > Looking at ...
3 years, 7 months ago (2017-05-04 22:11:51 UTC) #17
Jamie
PTAL
3 years, 7 months ago (2017-05-04 22:27:11 UTC) #18
rkjnsn
Mostly looks good, with one comment. https://codereview.chromium.org/2847853003/diff/180001/remoting/host/it2me/it2me_native_messaging_host_unittest.cc File remoting/host/it2me/it2me_native_messaging_host_unittest.cc (right): https://codereview.chromium.org/2847853003/diff/180001/remoting/host/it2me/it2me_native_messaging_host_unittest.cc#newcode536 remoting/host/it2me/it2me_native_messaging_host_unittest.cc:536: fake_policy_service_.get(), context->file_task_runner()); This ...
3 years, 7 months ago (2017-05-04 22:52:40 UTC) #19
Jamie
PTAL https://codereview.chromium.org/2847853003/diff/180001/remoting/host/it2me/it2me_native_messaging_host_unittest.cc File remoting/host/it2me/it2me_native_messaging_host_unittest.cc (right): https://codereview.chromium.org/2847853003/diff/180001/remoting/host/it2me/it2me_native_messaging_host_unittest.cc#newcode536 remoting/host/it2me/it2me_native_messaging_host_unittest.cc:536: fake_policy_service_.get(), context->file_task_runner()); On 2017/05/04 22:52:40, rkjnsn wrote: > ...
3 years, 7 months ago (2017-05-04 23:08:40 UTC) #20
rkjnsn
lgtm
3 years, 7 months ago (2017-05-04 23:28:47 UTC) #21
Jamie
Joe, can I get an LGTM for committers?
3 years, 7 months ago (2017-05-05 00:35:29 UTC) #22
joedow
lgtm https://codereview.chromium.org/2847853003/diff/200001/remoting/host/it2me/it2me_host.h File remoting/host/it2me/it2me_host.h (right): https://codereview.chromium.org/2847853003/diff/200001/remoting/host/it2me/it2me_host.h#newcode96 remoting/host/it2me/it2me_host.h:96: // Called when initial policies are read, and ...
3 years, 7 months ago (2017-05-05 14:42:15 UTC) #23
Jamie
FYI https://codereview.chromium.org/2847853003/diff/200001/remoting/host/it2me/it2me_host.h File remoting/host/it2me/it2me_host.h (right): https://codereview.chromium.org/2847853003/diff/200001/remoting/host/it2me/it2me_host.h#newcode96 remoting/host/it2me/it2me_host.h:96: // Called when initial policies are read, and ...
3 years, 7 months ago (2017-05-05 16:49:06 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2847853003/220001
3 years, 7 months ago (2017-05-05 16:49:51 UTC) #27
rkjnsn
https://codereview.chromium.org/2847853003/diff/200001/remoting/host/policy_watcher.cc File remoting/host/policy_watcher.cc (right): https://codereview.chromium.org/2847853003/diff/200001/remoting/host/policy_watcher.cc#newcode162 remoting/host/policy_watcher.cc:162: // If old_policies is empty, then the PolicyService has ...
3 years, 7 months ago (2017-05-05 16:53:04 UTC) #28
Jamie
https://codereview.chromium.org/2847853003/diff/200001/remoting/host/policy_watcher.cc File remoting/host/policy_watcher.cc (right): https://codereview.chromium.org/2847853003/diff/200001/remoting/host/policy_watcher.cc#newcode162 remoting/host/policy_watcher.cc:162: // If old_policies is empty, then the PolicyService has ...
3 years, 7 months ago (2017-05-05 16:57:58 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2847853003/240001
3 years, 7 months ago (2017-05-05 16:58:04 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/333149)
3 years, 7 months ago (2017-05-05 17:11:44 UTC) #35
Jamie
Devlin, ptal for chrome/browser/extensions/api/messaging/ OWNERS
3 years, 7 months ago (2017-05-05 18:24:10 UTC) #39
Devlin
extensions lgtm
3 years, 7 months ago (2017-05-05 18:27:25 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2847853003/280001
3 years, 7 months ago (2017-05-05 20:47:19 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/333372) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
3 years, 7 months ago (2017-05-05 20:56:55 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2847853003/300001
3 years, 7 months ago (2017-05-05 21:26:21 UTC) #48
commit-bot: I haz the power
3 years, 7 months ago (2017-05-06 00:52:55 UTC) #52
Message was sent while issue was closed.
Committed patchset #16 (id:300001) as
https://chromium.googlesource.com/chromium/src/+/cf2cc68d4e6a4a70bcadfd5491f9...

Powered by Google App Engine
This is Rietveld 408576698