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

Issue 891053003: Reporting a policy error after detecting mistyped policies. (Closed)

Created:
5 years, 10 months ago by Łukasz Anforowicz
Modified:
5 years, 10 months ago
Reviewers:
Sergey Ulanov
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reporting a policy error after detecting mistyped policies. After this changelist policy::Schema is used to validate policy contents. Mistyped values trigger PolicyWatcher::PolicyErrorCallback. Misspelled names trigger just a LOG(WARNING) message. As a follow-up to using policy::Schema for validation, we can remove ad-hoc fallback values for 2 out of 15 or our policies that used to be stored in PolicyWatcher::bad_type_values_. This can be replaced with a CHECK that verifies that the Schema indeed didn't pass through any mistyped values. As another follow-up we can remove the TODO comment asking to start using PolicyWatcher::PolicyErrorCallback again. We can also remove SignalTransientPolicyError which is not used anymore at this point (we can hesitantly consider reintroducing it if needed to handle detection of unparseable files; this is still some time in the future though). BUG=427513 TEST=remoting_unittests + manual verification on Win and Linux via TestRealChromotingPolicy Committed: https://crrev.com/e5d69ea2ccfe129eccd06d3b1de43a7092ee201d Cr-Commit-Position: refs/heads/master@{#317646}

Patch Set 1 : #

Total comments: 8

Patch Set 2 : Addressed code review feedback from Sergey. #

Patch Set 3 : Rebasing... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -112 lines) Patch
M remoting/host/policy_watcher.h View 4 chunks +4 lines, -14 lines 0 comments Download
M remoting/host/policy_watcher.cc View 1 9 chunks +63 lines, -46 lines 0 comments Download
M remoting/host/policy_watcher_unittest.cc View 1 7 chunks +31 lines, -52 lines 0 comments Download

Messages

Total messages: 18 (10 generated)
Łukasz Anforowicz
Sergey, could you please take a look?
5 years, 10 months ago (2015-02-12 00:21:00 UTC) #7
Sergey Ulanov
lgtm with some nits. https://codereview.chromium.org/891053003/diff/100001/remoting/host/policy_watcher.cc File remoting/host/policy_watcher.cc (right): https://codereview.chromium.org/891053003/diff/100001/remoting/host/policy_watcher.cc#newcode59 remoting/host/policy_watcher.cc:59: CHECK(value->IsType(i.value().GetType())); Does this need to ...
5 years, 10 months ago (2015-02-12 19:22:59 UTC) #8
Łukasz Anforowicz
Thanks for the feedback. I tried addressing it in patchset #2. -Lukasz https://codereview.chromium.org/891053003/diff/100001/remoting/host/policy_watcher.cc File remoting/host/policy_watcher.cc ...
5 years, 10 months ago (2015-02-12 20:34:14 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/891053003/140001
5 years, 10 months ago (2015-02-23 19:30:09 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/61854)
5 years, 10 months ago (2015-02-23 19:36:15 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/891053003/140001
5 years, 10 months ago (2015-02-23 20:59:46 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:140001)
5 years, 10 months ago (2015-02-23 21:00:43 UTC) #17
commit-bot: I haz the power
5 years, 10 months ago (2015-02-23 21:01:16 UTC) #18
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/e5d69ea2ccfe129eccd06d3b1de43a7092ee201d
Cr-Commit-Position: refs/heads/master@{#317646}

Powered by Google App Engine
This is Rietveld 408576698