OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/policy/cloud_policy_cache_base.h" | 5 #include "chrome/browser/policy/cloud_policy_cache_base.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/values.h" | |
12 #include "chrome/browser/policy/enterprise_metrics.h" | 11 #include "chrome/browser/policy/enterprise_metrics.h" |
13 #include "chrome/browser/policy/policy_notifier.h" | 12 #include "chrome/browser/policy/policy_notifier.h" |
14 | 13 |
15 namespace policy { | 14 namespace policy { |
16 | 15 |
17 CloudPolicyCacheBase::CloudPolicyCacheBase() | 16 CloudPolicyCacheBase::CloudPolicyCacheBase() |
18 : notifier_(NULL), | 17 : notifier_(NULL), |
19 initialization_complete_(false), | 18 initialization_complete_(false), |
20 is_unmanaged_(false) { | 19 is_unmanaged_(false) { |
21 public_key_version_.version = 0; | 20 public_key_version_.version = 0; |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 void CloudPolicyCacheBase::InformNotifier( | 164 void CloudPolicyCacheBase::InformNotifier( |
166 CloudPolicySubsystem::PolicySubsystemState state, | 165 CloudPolicySubsystem::PolicySubsystemState state, |
167 CloudPolicySubsystem::ErrorDetails error_details) { | 166 CloudPolicySubsystem::ErrorDetails error_details) { |
168 // TODO(jkummerow): To obsolete this NULL-check, make all uses of | 167 // TODO(jkummerow): To obsolete this NULL-check, make all uses of |
169 // UserPolicyCache explicitly set a notifier using |set_policy_notifier()|. | 168 // UserPolicyCache explicitly set a notifier using |set_policy_notifier()|. |
170 if (notifier_) | 169 if (notifier_) |
171 notifier_->Inform(state, error_details, PolicyNotifier::POLICY_CACHE); | 170 notifier_->Inform(state, error_details, PolicyNotifier::POLICY_CACHE); |
172 } | 171 } |
173 | 172 |
174 } // namespace policy | 173 } // namespace policy |
OLD | NEW |