OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <vector> | 5 #include <vector> |
6 | 6 |
peria
2014/07/04 05:36:44
Add #include "base/single_thread_task_runner.h" ?
tzik
2014/07/04 05:58:13
Done.
Looks like threading/thread.h #include's it
| |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/message_loop/message_loop_proxy.h" | |
12 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
13 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "base/thread_task_runner_handle.h" | |
14 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
15 #include "chrome/browser/sync_file_system/file_change.h" | 15 #include "chrome/browser/sync_file_system/file_change.h" |
16 #include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h" | 16 #include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h" |
17 #include "chrome/browser/sync_file_system/local/local_file_change_tracker.h" | 17 #include "chrome/browser/sync_file_system/local/local_file_change_tracker.h" |
18 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" | 18 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" |
19 #include "chrome/browser/sync_file_system/local/local_file_sync_service.h" | 19 #include "chrome/browser/sync_file_system/local/local_file_sync_service.h" |
20 #include "chrome/browser/sync_file_system/local/local_file_sync_status.h" | 20 #include "chrome/browser/sync_file_system/local/local_file_sync_status.h" |
21 #include "chrome/browser/sync_file_system/local/mock_sync_status_observer.h" | 21 #include "chrome/browser/sync_file_system/local/mock_sync_status_observer.h" |
22 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" | 22 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" |
23 #include "chrome/browser/sync_file_system/mock_local_change_processor.h" | 23 #include "chrome/browser/sync_file_system/mock_local_change_processor.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 SyncFileMetadata* metadata_out, | 81 SyncFileMetadata* metadata_out, |
82 SyncStatusCode status, | 82 SyncStatusCode status, |
83 const SyncFileMetadata& metadata) { | 83 const SyncFileMetadata& metadata) { |
84 SCOPED_TRACE(testing::Message() << where.ToString()); | 84 SCOPED_TRACE(testing::Message() << where.ToString()); |
85 *status_out = status; | 85 *status_out = status; |
86 *metadata_out = metadata; | 86 *metadata_out = metadata; |
87 oncompleted.Run(); | 87 oncompleted.Run(); |
88 } | 88 } |
89 | 89 |
90 ACTION_P(MockStatusCallback, status) { | 90 ACTION_P(MockStatusCallback, status) { |
91 base::MessageLoopProxy::current()->PostTask( | 91 base::ThreadTaskRunnerHandle::Get()->PostTask( |
92 FROM_HERE, base::Bind(arg4, status)); | 92 FROM_HERE, base::Bind(arg4, status)); |
93 } | 93 } |
94 | 94 |
95 ACTION_P2(MockStatusCallbackAndRecordChange, status, changes) { | 95 ACTION_P2(MockStatusCallbackAndRecordChange, status, changes) { |
96 base::MessageLoopProxy::current()->PostTask( | 96 base::ThreadTaskRunnerHandle::Get()->PostTask( |
97 FROM_HERE, base::Bind(arg4, status)); | 97 FROM_HERE, base::Bind(arg4, status)); |
98 changes->push_back(arg0); | 98 changes->push_back(arg0); |
99 } | 99 } |
100 | 100 |
101 } // namespace | 101 } // namespace |
102 | 102 |
103 class LocalFileSyncServiceTest | 103 class LocalFileSyncServiceTest |
104 : public testing::Test, | 104 : public testing::Test, |
105 public LocalFileSyncService::Observer { | 105 public LocalFileSyncService::Observer { |
106 protected: | 106 protected: |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
726 all_origins.insert(kOrigin2); | 726 all_origins.insert(kOrigin2); |
727 all_origins.insert(kOrigin3); | 727 all_origins.insert(kOrigin3); |
728 while (!all_origins.empty()) { | 728 while (!all_origins.empty()) { |
729 ASSERT_TRUE(NextOriginToProcess(&origin)); | 729 ASSERT_TRUE(NextOriginToProcess(&origin)); |
730 ASSERT_TRUE(ContainsKey(all_origins, origin)); | 730 ASSERT_TRUE(ContainsKey(all_origins, origin)); |
731 all_origins.erase(origin); | 731 all_origins.erase(origin); |
732 } | 732 } |
733 } | 733 } |
734 | 734 |
735 } // namespace sync_file_system | 735 } // namespace sync_file_system |
OLD | NEW |