| 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 return syncer::SyncDataList(); |
| 37 } |
| 38 |
| 35 private: | 39 private: |
| 36 syncer::SyncChangeList change_list_; | 40 syncer::SyncChangeList change_list_; |
| 37 | 41 |
| 38 DISALLOW_COPY_AND_ASSIGN(MockChangeProcessor); | 42 DISALLOW_COPY_AND_ASSIGN(MockChangeProcessor); |
| 39 }; | 43 }; |
| 40 | 44 |
| 41 syncer::SyncError MockChangeProcessor::ProcessSyncChanges( | 45 syncer::SyncError MockChangeProcessor::ProcessSyncChanges( |
| 42 const tracked_objects::Location& from_here, | 46 const tracked_objects::Location& from_here, |
| 43 const syncer::SyncChangeList& change_list) { | 47 const syncer::SyncChangeList& change_list) { |
| 44 change_list_ = change_list; | 48 change_list_ = change_list; |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())); | 389 PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())); |
| 386 policy_map->Set(kPolicyKey, | 390 policy_map->Set(kPolicyKey, |
| 387 POLICY_LEVEL_MANDATORY, | 391 POLICY_LEVEL_MANDATORY, |
| 388 POLICY_SCOPE_USER, | 392 POLICY_SCOPE_USER, |
| 389 policy_value.DeepCopy(), | 393 policy_value.DeepCopy(), |
| 390 NULL); | 394 NULL); |
| 391 EXPECT_TRUE(provider_.policies().Equals(expected_bundle)); | 395 EXPECT_TRUE(provider_.policies().Equals(expected_bundle)); |
| 392 } | 396 } |
| 393 | 397 |
| 394 } // namespace policy | 398 } // namespace policy |
| OLD | NEW |