| 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/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
| 10 #include "chrome/browser/sync_file_system/local_file_sync_service.h" | 10 #include "chrome/browser/sync_file_system/local_file_sync_service.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 class MockSyncEventObserver : public SyncEventObserver { | 69 class MockSyncEventObserver : public SyncEventObserver { |
| 70 public: | 70 public: |
| 71 MockSyncEventObserver() {} | 71 MockSyncEventObserver() {} |
| 72 virtual ~MockSyncEventObserver() {} | 72 virtual ~MockSyncEventObserver() {} |
| 73 | 73 |
| 74 MOCK_METHOD3(OnSyncStateUpdated, | 74 MOCK_METHOD3(OnSyncStateUpdated, |
| 75 void(const GURL& app_origin, | 75 void(const GURL& app_origin, |
| 76 SyncServiceState state, | 76 SyncServiceState state, |
| 77 const std::string& description)); | 77 const std::string& description)); |
| 78 MOCK_METHOD3(OnFileSynced, | 78 MOCK_METHOD2(OnFileSynced, |
| 79 void(fileapi::SyncStatusCode status, | 79 void(fileapi::SyncOperationType operation, |
| 80 fileapi::SyncOperationType operation, | |
| 81 const fileapi::FileSystemURL& url)); | 80 const fileapi::FileSystemURL& url)); |
| 82 }; | 81 }; |
| 83 | 82 |
| 84 ACTION_P3(NotifyStateAndCallback, | 83 ACTION_P3(NotifyStateAndCallback, |
| 85 mock_remote_service, service_state, operation_status) { | 84 mock_remote_service, service_state, operation_status) { |
| 86 mock_remote_service->NotifyRemoteServiceStateUpdated( | 85 mock_remote_service->NotifyRemoteServiceStateUpdated( |
| 87 service_state, "Test event."); | 86 service_state, "Test event."); |
| 88 base::MessageLoopProxy::current()->PostTask( | 87 base::MessageLoopProxy::current()->PostTask( |
| 89 FROM_HERE, base::Bind(arg1, operation_status)); | 88 FROM_HERE, base::Bind(arg1, operation_status)); |
| 90 } | 89 } |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 kFile, base::Bind(&VerifyFileError, &event))); | 532 kFile, base::Bind(&VerifyFileError, &event))); |
| 534 | 533 |
| 535 run_loop.Run(); | 534 run_loop.Run(); |
| 536 | 535 |
| 537 mock_remote_service()->NotifyRemoteChangeAvailable(0); | 536 mock_remote_service()->NotifyRemoteChangeAvailable(0); |
| 538 | 537 |
| 539 event.Wait(); | 538 event.Wait(); |
| 540 } | 539 } |
| 541 | 540 |
| 542 } // namespace sync_file_system | 541 } // namespace sync_file_system |
| OLD | NEW |