| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/prefs/scoped_user_pref_update.h" | 9 #include "base/prefs/scoped_user_pref_update.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 using syncer::SyncDataList; | 34 using syncer::SyncDataList; |
| 35 using syncer::SyncError; | 35 using syncer::SyncError; |
| 36 using syncer::SyncErrorFactory; | 36 using syncer::SyncErrorFactory; |
| 37 using syncer::SyncMergeResult; | 37 using syncer::SyncMergeResult; |
| 38 | 38 |
| 39 namespace { | 39 namespace { |
| 40 | 40 |
| 41 class MockChangeProcessor : public SyncChangeProcessor { | 41 class MockChangeProcessor : public SyncChangeProcessor { |
| 42 public: | 42 public: |
| 43 MockChangeProcessor() {} | 43 MockChangeProcessor() {} |
| 44 virtual ~MockChangeProcessor() {} | 44 ~MockChangeProcessor() override {} |
| 45 | 45 |
| 46 // SyncChangeProcessor implementation: | 46 // SyncChangeProcessor implementation: |
| 47 virtual SyncError ProcessSyncChanges( | 47 SyncError ProcessSyncChanges(const tracked_objects::Location& from_here, |
| 48 const tracked_objects::Location& from_here, | 48 const SyncChangeList& change_list) override; |
| 49 const SyncChangeList& change_list) override; | |
| 50 | 49 |
| 51 virtual SyncDataList GetAllSyncData(syncer::ModelType type) const | 50 SyncDataList GetAllSyncData(syncer::ModelType type) const override { |
| 52 override { | |
| 53 return SyncDataList(); | 51 return SyncDataList(); |
| 54 } | 52 } |
| 55 | 53 |
| 56 const SyncChangeList& changes() const { return change_list_; } | 54 const SyncChangeList& changes() const { return change_list_; } |
| 57 SyncChange GetChange(const std::string& id) const; | 55 SyncChange GetChange(const std::string& id) const; |
| 58 | 56 |
| 59 private: | 57 private: |
| 60 SyncChangeList change_list_; | 58 SyncChangeList change_list_; |
| 61 }; | 59 }; |
| 62 | 60 |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 358 |
| 361 EXPECT_FALSE(SupervisedUserSyncService::GetAvatarIndex( | 359 EXPECT_FALSE(SupervisedUserSyncService::GetAvatarIndex( |
| 362 "chrome-avatar-index:x", | 360 "chrome-avatar-index:x", |
| 363 &avatar)); | 361 &avatar)); |
| 364 | 362 |
| 365 EXPECT_FALSE(SupervisedUserSyncService::GetAvatarIndex( | 363 EXPECT_FALSE(SupervisedUserSyncService::GetAvatarIndex( |
| 366 "chromeos-avatar-index:5", | 364 "chromeos-avatar-index:5", |
| 367 &avatar)); | 365 &avatar)); |
| 368 #endif | 366 #endif |
| 369 } | 367 } |
| OLD | NEW |