OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/callback.h" | 5 #include "base/callback.h" |
6 #include "base/json/json_reader.h" | 6 #include "base/json/json_reader.h" |
7 #include "base/prefs/testing_pref_store.h" | 7 #include "base/prefs/testing_pref_store.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "chrome/browser/policy/configuration_policy_provider_test.h" | 9 #include "chrome/browser/policy/configuration_policy_provider_test.h" |
10 #include "chrome/browser/policy/external_data_fetcher.h" | 10 #include "chrome/browser/policy/external_data_fetcher.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 MockChangeProcessor() {} | 25 MockChangeProcessor() {} |
26 virtual ~MockChangeProcessor() {} | 26 virtual ~MockChangeProcessor() {} |
27 | 27 |
28 // SyncChangeProcessor implementation: | 28 // SyncChangeProcessor implementation: |
29 virtual syncer::SyncError ProcessSyncChanges( | 29 virtual syncer::SyncError ProcessSyncChanges( |
30 const tracked_objects::Location& from_here, | 30 const tracked_objects::Location& from_here, |
31 const syncer::SyncChangeList& change_list) OVERRIDE; | 31 const syncer::SyncChangeList& change_list) OVERRIDE; |
32 | 32 |
33 const syncer::SyncChangeList& changes() const { return change_list_; } | 33 const syncer::SyncChangeList& changes() const { return change_list_; } |
34 | 34 |
| 35 virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const |
| 36 OVERRIDE { |
| 37 return syncer::SyncDataList(); |
| 38 } |
| 39 |
35 private: | 40 private: |
36 syncer::SyncChangeList change_list_; | 41 syncer::SyncChangeList change_list_; |
37 | 42 |
38 DISALLOW_COPY_AND_ASSIGN(MockChangeProcessor); | 43 DISALLOW_COPY_AND_ASSIGN(MockChangeProcessor); |
39 }; | 44 }; |
40 | 45 |
41 syncer::SyncError MockChangeProcessor::ProcessSyncChanges( | 46 syncer::SyncError MockChangeProcessor::ProcessSyncChanges( |
42 const tracked_objects::Location& from_here, | 47 const tracked_objects::Location& from_here, |
43 const syncer::SyncChangeList& change_list) { | 48 const syncer::SyncChangeList& change_list) { |
44 change_list_ = change_list; | 49 change_list_ = change_list; |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())); | 390 PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())); |
386 policy_map->Set(kPolicyKey, | 391 policy_map->Set(kPolicyKey, |
387 POLICY_LEVEL_MANDATORY, | 392 POLICY_LEVEL_MANDATORY, |
388 POLICY_SCOPE_USER, | 393 POLICY_SCOPE_USER, |
389 policy_value.DeepCopy(), | 394 policy_value.DeepCopy(), |
390 NULL); | 395 NULL); |
391 EXPECT_TRUE(provider_.policies().Equals(expected_bundle)); | 396 EXPECT_TRUE(provider_.policies().Equals(expected_bundle)); |
392 } | 397 } |
393 | 398 |
394 } // namespace policy | 399 } // namespace policy |
OLD | NEW |