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

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

Issue 5348001: Device management constants cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nit; fix DMPolicyCache unit tests Created 10 years, 1 month 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/device_management_policy_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/device_management_policy_cache.cc
diff --git a/chrome/browser/policy/device_management_policy_cache.cc b/chrome/browser/policy/device_management_policy_cache.cc
index 534794de5619237e0f4fd6ed8697d8bfcf54469b..2cc2bc5220c3ed7d08859fab69a1e0af969b3f28 100644
--- a/chrome/browser/policy/device_management_policy_cache.cc
+++ b/chrome/browser/policy/device_management_policy_cache.cc
@@ -12,6 +12,7 @@
#include "base/task.h"
#include "base/values.h"
#include "chrome/browser/browser_thread.h"
+#include "chrome/browser/policy/proto/device_management_constants.h"
#include "chrome/browser/policy/proto/device_management_local.pb.h"
using google::protobuf::RepeatedField;
@@ -222,6 +223,10 @@ DictionaryValue* DeviceManagementPolicyCache::DecodePolicy(
for (setting = policy.setting().begin();
setting != policy.setting().end();
++setting) {
+ // Wrong policy key? Skip.
+ if (setting->policy_key().compare(kChromeDevicePolicySettingKey) != 0)
+ continue;
+
// No policy value? Skip.
if (!setting->has_policy_value())
continue;
« no previous file with comments | « no previous file | chrome/browser/policy/device_management_policy_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698