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

Issue 11415148: Adding error handling to ONC validation. (Closed)

Created:
8 years ago by pneubeck (no reviews)
Modified:
8 years ago
CC:
chromium-reviews, nkostylev+watch_chromium.org, eroman, gspencer+watch_chromium.org, gauravsh+watch_chromium.org, arv (Not doing code reviews), mmenke, oshima+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@extract_onc_certificate
Visibility:
Public.

Description

Adding error handling to ONC validation - Completed the validation of toplevel ONC - Moved kEmptyConfiguration to onc_utils.* and validated it in the validator unit test. BUG=162801, 162802 TEST=Check that both policy and user import show correct error messages (on about:policy or about:net-internals). Check that valid or repairable ONC is still accepted.

Patch Set 1 : Initial patch. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+696 lines, -332 lines) Patch
M chrome/app/chromeos_strings.grdp View 1 chunk +42 lines, -0 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/cros/network_library_impl_base.cc View 5 chunks +29 lines, -11 lines 0 comments Download
M chrome/browser/chromeos/network_settings/onc_mapper.h View 1 chunk +39 lines, -31 lines 0 comments Download
M chrome/browser/chromeos/network_settings/onc_mapper.cc View 4 chunks +48 lines, -44 lines 0 comments Download
M chrome/browser/chromeos/network_settings/onc_merger_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/network_settings/onc_normalizer.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/chromeos/network_settings/onc_normalizer.cc View 1 chunk +8 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/network_settings/onc_signature.h View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/chromeos/network_settings/onc_signature.cc View 3 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/network_settings/onc_translator_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/network_settings/onc_utils.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/network_settings/onc_utils.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/network_settings/onc_validator.h View 5 chunks +56 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/network_settings/onc_validator.cc View 21 chunks +290 lines, -122 lines 0 comments Download
M chrome/browser/chromeos/network_settings/onc_validator_unittest.cc View 3 chunks +56 lines, -16 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler_chromeos.cc View 2 chunks +7 lines, -4 lines 3 comments Download
M chrome/browser/policy/network_configuration_updater.h View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/policy/network_configuration_updater.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/policy/network_configuration_updater_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/resources/net_internals/browser_bridge.js View 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/resources/net_internals/chromeos_view.js View 3 chunks +16 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/net_internals/net_internals_ui.cc View 1 chunk +13 lines, -7 lines 0 comments Download
A + chrome/test/data/chromeos/network_settings/managed_ethernet.onc View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/test/data/chromeos/network_settings/managed_toplevel.onc View 1 chunk +47 lines, -0 lines 0 comments Download
A + chrome/test/data/chromeos/network_settings/managed_vpn.onc View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/chromeos/network_settings/managed_vpn_without_recommended.onc View 0 chunks +-1 lines, --1 lines 0 comments Download
D chrome/test/data/chromeos/network_settings/policy.onc View 1 chunk +0 lines, -29 lines 0 comments Download
D chrome/test/data/chromeos/network_settings/policy_without_recommended.onc View 1 chunk +0 lines, -26 lines 0 comments Download
A chrome/test/data/chromeos/network_settings/recommended_in_unmanaged.onc View 1 chunk +8 lines, -0 lines 0 comments Download
D chrome/test/data/chromeos/network_settings/valid.onc View 1 chunk +0 lines, -7 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
pneubeck (no reviews)
I have finally prepared the user visible error handling to the ONC validation. This should ...
8 years ago (2012-11-28 20:21:39 UTC) #1
Mattias Nissler (ping if slow)
https://codereview.chromium.org/11415148/diff/6035/chrome/browser/policy/configuration_policy_handler_chromeos.cc File chrome/browser/policy/configuration_policy_handler_chromeos.cc (right): https://codereview.chromium.org/11415148/diff/6035/chrome/browser/policy/configuration_policy_handler_chromeos.cc#newcode74 chrome/browser/policy/configuration_policy_handler_chromeos.cc:74: messages); It seems weird that instead of adding individual ...
8 years ago (2012-11-29 12:49:24 UTC) #2
pneubeck (no reviews)
https://codereview.chromium.org/11415148/diff/6035/chrome/browser/policy/configuration_policy_handler_chromeos.cc File chrome/browser/policy/configuration_policy_handler_chromeos.cc (right): https://codereview.chromium.org/11415148/diff/6035/chrome/browser/policy/configuration_policy_handler_chromeos.cc#newcode74 chrome/browser/policy/configuration_policy_handler_chromeos.cc:74: messages); On 2012/11/29 12:49:24, Mattias Nissler wrote: > It ...
8 years ago (2012-11-29 12:58:01 UTC) #3
Mattias Nissler (ping if slow)
https://codereview.chromium.org/11415148/diff/6035/chrome/browser/policy/configuration_policy_handler_chromeos.cc File chrome/browser/policy/configuration_policy_handler_chromeos.cc (right): https://codereview.chromium.org/11415148/diff/6035/chrome/browser/policy/configuration_policy_handler_chromeos.cc#newcode74 chrome/browser/policy/configuration_policy_handler_chromeos.cc:74: messages); On 2012/11/29 12:58:02, pneubeck wrote: > On 2012/11/29 ...
8 years ago (2012-11-29 13:09:18 UTC) #4
pneubeck (no reviews)
8 years ago (2012-11-29 13:19:46 UTC) #5
On 2012/11/29 13:09:18, Mattias Nissler wrote:
>
https://codereview.chromium.org/11415148/diff/6035/chrome/browser/policy/conf...
> File chrome/browser/policy/configuration_policy_handler_chromeos.cc (right):
> 
>
https://codereview.chromium.org/11415148/diff/6035/chrome/browser/policy/conf...
> chrome/browser/policy/configuration_policy_handler_chromeos.cc:74: messages);
> On 2012/11/29 12:58:02, pneubeck wrote:
> > On 2012/11/29 12:49:24, Mattias Nissler wrote:
> > > It seems weird that instead of adding individual errors here, you instead
> add
> > > just one error that holds the concatenation of all the errors you
> encountered.
> > > 
> > > Have you considered using something like PolicyErrorMap for gathering and
> > > returning errors during parsing/validation?
> > 
> > What for?
> > I could imagine, that having a list of errors (sth. like vector<string>)
would
> > help layouting of the message. However, the win seems minimal compared to
> having
> > linebreaks between the errors.
> 
> Right, now what if you want to format this in HTML? Linebreaks in HTML don't
> cause linebreaks ;)

That's why I had to replace linebreaks with HTML breaks.


> about:policy just joins errors at the moment (using a blank as the separator,
so
> this is already inconsistent with your joining), but once we're making it more
> user-consumable, we'd have to make it into an itemized list in HTML anyways,
and
> then we need to have individual items.

If we already knew that we will do it that way, then using vector<string>*
instead of string* should be sufficient and I'd be okay with that.
I am just worried that I will have to change that all again, once we decided how
we really want to do it.

E.g. someone could come up with hierarchical errors, or that we need
enumerations instead of translated errors (e.g. if we want to do the translation
server side for admins), etc.

Powered by Google App Engine
This is Rietveld 408576698