| 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_provider.h" | 5 #include "chrome/browser/policy/cloud_policy_provider.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/policy/cloud_policy_cache_base.h" | 9 #include "chrome/browser/policy/cloud_policy_cache_base.h" |
| 10 #include "chrome/browser/policy/cloud_policy_provider_impl.h" | 10 #include "chrome/browser/policy/cloud_policy_provider_impl.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 } | 40 } |
| 41 | 41 |
| 42 PolicyMap* raw_recommended_policy() { | 42 PolicyMap* raw_recommended_policy() { |
| 43 return &recommended_policy_; | 43 return &recommended_policy_; |
| 44 } | 44 } |
| 45 | 45 |
| 46 void SetUnmanaged() { | 46 void SetUnmanaged() { |
| 47 is_unmanaged_ = true; | 47 is_unmanaged_ = true; |
| 48 } | 48 } |
| 49 | 49 |
| 50 void SetFetchingDone() { |
| 51 // Implement pure virtual method. |
| 52 } |
| 53 |
| 50 void set_initialized(bool initialized) { | 54 void set_initialized(bool initialized) { |
| 51 initialization_complete_ = initialized; | 55 initialization_complete_ = initialized; |
| 52 } | 56 } |
| 53 | 57 |
| 54 private: | 58 private: |
| 55 DISALLOW_COPY_AND_ASSIGN(MockCloudPolicyCache); | 59 DISALLOW_COPY_AND_ASSIGN(MockCloudPolicyCache); |
| 56 }; | 60 }; |
| 57 | 61 |
| 58 class CloudPolicyProviderTest : public testing::Test { | 62 class CloudPolicyProviderTest : public testing::Test { |
| 59 protected: | 63 protected: |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 B.Set(kPolicyProxyPacUrl, Value::CreateIntegerValue(b_value)); | 234 B.Set(kPolicyProxyPacUrl, Value::CreateIntegerValue(b_value)); |
| 231 B.Set(kPolicyProxyBypassList, Value::CreateIntegerValue(b_value)); | 235 B.Set(kPolicyProxyBypassList, Value::CreateIntegerValue(b_value)); |
| 232 | 236 |
| 233 CombineTwoPolicyMaps(A, B, &C); | 237 CombineTwoPolicyMaps(A, B, &C); |
| 234 | 238 |
| 235 EXPECT_TRUE(A.Equals(C)); | 239 EXPECT_TRUE(A.Equals(C)); |
| 236 EXPECT_FALSE(B.Equals(C)); | 240 EXPECT_FALSE(B.Equals(C)); |
| 237 } | 241 } |
| 238 | 242 |
| 239 } // namespace policy | 243 } // namespace policy |
| OLD | NEW |