Commit 86069077 authored by Robert Ogden's avatar Robert Ogden Committed by Commit Bot

Add LOG(ERROR) to ClientConfig override parsing

Allows a non-Chromium dev to notice when a bad ClientConfig has been
given. Only does LOG(ERROR) in non-debug builds though since DCHECK is
otherwise sufficent.

Bug: 724242
Change-Id: Id3b7138e81329c296e0aaeac326e2e212e4362e6
Reviewed-on: https://chromium-review.googlesource.com/1087513Reviewed-by: default avatarRyan Sturm <ryansturm@chromium.org>
Commit-Queue: Robert Ogden <robertogden@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564755}
parent d3212988
......@@ -256,11 +256,12 @@ void DataReductionProxyConfigServiceClient::RetrieveConfig() {
std::string override_config;
bool b64_decode_ok =
base::Base64Decode(client_config_override_, &override_config);
DCHECK(b64_decode_ok) << "The given ClientConfig is not valid base64";
LOG_IF(DFATAL, !b64_decode_ok)
<< "The given ClientConfig is not valid base64";
ClientConfig config;
bool was_valid_config = config.ParseFromString(override_config);
DCHECK(was_valid_config) << "The given ClientConfig was invalid.";
LOG_IF(DFATAL, !was_valid_config) << "The given ClientConfig was invalid.";
if (was_valid_config)
ParseAndApplyProxyConfig(config);
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment