| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chromeos/policy/cloud_external_data_manager_base_test_u
til.h" | 5 #include "chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_u
til.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 return metadata.Pass(); | 38 return metadata.Pass(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void SetExternalDataReference(CloudPolicyCore* core, | 41 void SetExternalDataReference(CloudPolicyCore* core, |
| 42 const std::string& policy, | 42 const std::string& policy, |
| 43 scoped_ptr<base::DictionaryValue> metadata) { | 43 scoped_ptr<base::DictionaryValue> metadata) { |
| 44 CloudPolicyStore* store = core->store(); | 44 CloudPolicyStore* store = core->store(); |
| 45 ASSERT_TRUE(store); | 45 ASSERT_TRUE(store); |
| 46 PolicyMap policy_map; | 46 PolicyMap policy_map; |
| 47 policy_map.Set(policy, | 47 policy_map.Set(policy, |
| 48 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD, | 48 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
| 49 metadata.release(), | 49 metadata.release(), |
| 50 new ExternalDataFetcher(store->external_data_manager(), | 50 new ExternalDataFetcher(store->external_data_manager(), |
| 51 policy)); | 51 policy)); |
| 52 store->SetPolicyMapForTesting(policy_map); | 52 store->SetPolicyMapForTesting(policy_map); |
| 53 } | 53 } |
| 54 | 54 |
| 55 } // namespace test | 55 } // namespace test |
| 56 } // namespace policy | 56 } // namespace policy |
| OLD | NEW |