| 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 "chrome/browser/sync_file_system/mock_remote_file_sync_service.h" | 5 #include "chrome/browser/sync_file_system/mock_remote_file_sync_service.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 .WillByDefault(Return(&mock_local_change_processor_)); | 38 .WillByDefault(Return(&mock_local_change_processor_)); |
| 39 ON_CALL(*this, GetCurrentState()) | 39 ON_CALL(*this, GetCurrentState()) |
| 40 .WillByDefault(Invoke(this, &self::GetCurrentStateStub)); | 40 .WillByDefault(Invoke(this, &self::GetCurrentStateStub)); |
| 41 } | 41 } |
| 42 | 42 |
| 43 MockRemoteFileSyncService::~MockRemoteFileSyncService() { | 43 MockRemoteFileSyncService::~MockRemoteFileSyncService() { |
| 44 } | 44 } |
| 45 | 45 |
| 46 void MockRemoteFileSyncService::DumpFiles(const GURL& origin, | 46 void MockRemoteFileSyncService::DumpFiles(const GURL& origin, |
| 47 const ListCallback& callback) { | 47 const ListCallback& callback) { |
| 48 callback.Run(scoped_ptr<base::ListValue>()); | 48 callback.Run(nullptr); |
| 49 } | 49 } |
| 50 | 50 |
| 51 void MockRemoteFileSyncService::DumpDatabase(const ListCallback& callback) { | 51 void MockRemoteFileSyncService::DumpDatabase(const ListCallback& callback) { |
| 52 callback.Run(scoped_ptr<base::ListValue>()); | 52 callback.Run(nullptr); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void MockRemoteFileSyncService::SetServiceState(RemoteServiceState state) { | 55 void MockRemoteFileSyncService::SetServiceState(RemoteServiceState state) { |
| 56 state_ = state; | 56 state_ = state; |
| 57 } | 57 } |
| 58 | 58 |
| 59 void MockRemoteFileSyncService::NotifyRemoteChangeQueueUpdated( | 59 void MockRemoteFileSyncService::NotifyRemoteChangeQueueUpdated( |
| 60 int64 pending_changes) { | 60 int64 pending_changes) { |
| 61 FOR_EACH_OBSERVER(Observer, service_observers_, | 61 FOR_EACH_OBSERVER(Observer, service_observers_, |
| 62 OnRemoteChangeQueueUpdated(pending_changes)); | 62 OnRemoteChangeQueueUpdated(pending_changes)); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 FROM_HERE, | 111 FROM_HERE, |
| 112 base::Bind( | 112 base::Bind( |
| 113 callback, SYNC_STATUS_NO_CHANGE_TO_SYNC, storage::FileSystemURL())); | 113 callback, SYNC_STATUS_NO_CHANGE_TO_SYNC, storage::FileSystemURL())); |
| 114 } | 114 } |
| 115 | 115 |
| 116 RemoteServiceState MockRemoteFileSyncService::GetCurrentStateStub() const { | 116 RemoteServiceState MockRemoteFileSyncService::GetCurrentStateStub() const { |
| 117 return state_; | 117 return state_; |
| 118 } | 118 } |
| 119 | 119 |
| 120 } // namespace sync_file_system | 120 } // namespace sync_file_system |
| OLD | NEW |