Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: chrome/browser/sync_file_system/mock_remote_file_sync_service.cc

Issue 11421197: Implement SyncFileSystemService::GetFileSyncStatus method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 14 matching lines...) Expand all
25 .WillByDefault(Invoke(this, &self::RemoveObserverStub)); 25 .WillByDefault(Invoke(this, &self::RemoveObserverStub));
26 ON_CALL(*this, RegisterOriginForTrackingChanges(_, _)) 26 ON_CALL(*this, RegisterOriginForTrackingChanges(_, _))
27 .WillByDefault(Invoke(this, &self::RegisterOriginForTrackingChangesStub)); 27 .WillByDefault(Invoke(this, &self::RegisterOriginForTrackingChangesStub));
28 ON_CALL(*this, UnregisterOriginForTrackingChanges(_, _)) 28 ON_CALL(*this, UnregisterOriginForTrackingChanges(_, _))
29 .WillByDefault( 29 .WillByDefault(
30 Invoke(this, &self::UnregisterOriginForTrackingChangesStub)); 30 Invoke(this, &self::UnregisterOriginForTrackingChangesStub));
31 ON_CALL(*this, ProcessRemoteChange(_, _)) 31 ON_CALL(*this, ProcessRemoteChange(_, _))
32 .WillByDefault(Invoke(this, &self::ProcessRemoteChangeStub)); 32 .WillByDefault(Invoke(this, &self::ProcessRemoteChangeStub));
33 ON_CALL(*this, GetLocalChangeProcessor()) 33 ON_CALL(*this, GetLocalChangeProcessor())
34 .WillByDefault(Return(&mock_local_change_processor_)); 34 .WillByDefault(Return(&mock_local_change_processor_));
35 ON_CALL(*this, IsConflicting(_))
36 .WillByDefault(Return(false));
35 ON_CALL(*this, GetConflictFiles(_, _)) 37 ON_CALL(*this, GetConflictFiles(_, _))
36 .WillByDefault(Invoke(this, &self::GetConflictFilesStub)); 38 .WillByDefault(Invoke(this, &self::GetConflictFilesStub));
37 ON_CALL(*this, GetRemoteFileMetadata(_, _)) 39 ON_CALL(*this, GetRemoteFileMetadata(_, _))
38 .WillByDefault(Invoke(this, &self::GetRemoteFileMetadataStub)); 40 .WillByDefault(Invoke(this, &self::GetRemoteFileMetadataStub));
39 ON_CALL(*this, GetCurrentState()) 41 ON_CALL(*this, GetCurrentState())
40 .WillByDefault(Return(REMOTE_SERVICE_OK)); 42 .WillByDefault(Return(REMOTE_SERVICE_OK));
41 } 43 }
42 44
43 MockRemoteFileSyncService::~MockRemoteFileSyncService() { 45 MockRemoteFileSyncService::~MockRemoteFileSyncService() {
44 } 46 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 FROM_HERE, 112 FROM_HERE,
111 base::Bind(callback, fileapi::SYNC_FILE_ERROR_NOT_FOUND, 113 base::Bind(callback, fileapi::SYNC_FILE_ERROR_NOT_FOUND,
112 fileapi::SyncFileMetadata())); 114 fileapi::SyncFileMetadata()));
113 return; 115 return;
114 } 116 }
115 base::MessageLoopProxy::current()->PostTask( 117 base::MessageLoopProxy::current()->PostTask(
116 FROM_HERE, base::Bind(callback, fileapi::SYNC_STATUS_OK, iter->second)); 118 FROM_HERE, base::Bind(callback, fileapi::SYNC_STATUS_OK, iter->second));
117 } 119 }
118 120
119 } // namespace sync_file_system 121 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698