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

Unified Diff: chrome/browser/policy/component_cloud_policy_updater.cc

Issue 12542015: Fixed a glitch in the ComponentCloudPolicyUpdater where a protobuf field was read before being vali… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/policy/component_cloud_policy_updater_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/component_cloud_policy_updater.cc
diff --git a/chrome/browser/policy/component_cloud_policy_updater.cc b/chrome/browser/policy/component_cloud_policy_updater.cc
index 601b345d8de98ab4a4b8c7fcdea7dc476d57cb94..1ce3f275429949b72c86f12b543789851ead7ce5 100644
--- a/chrome/browser/policy/component_cloud_policy_updater.cc
+++ b/chrome/browser/policy/component_cloud_policy_updater.cc
@@ -351,8 +351,10 @@ void ComponentCloudPolicyUpdater::UpdateExternalPolicy(
}
// Maybe the data for this hash has already been downloaded and cached.
- if (data.secure_hash() == store_->GetCachedHash(ns))
+ if (data.has_secure_hash() &&
+ data.secure_hash() == store_->GetCachedHash(ns)) {
return;
+ }
// TODO(joaodasilva): implement the other two auth methods.
if (data.download_auth_method() != em::ExternalPolicyData::NONE)
« no previous file with comments | « no previous file | chrome/browser/policy/component_cloud_policy_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698