| 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/drive_metadata_store.h" | 5 #include "chrome/browser/sync_file_system/drive_metadata_store.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 itr != left.end(); ++itr) { | 303 itr != left.end(); ++itr) { |
| 304 OriginByResourceId::const_iterator found = right.find(itr->second); | 304 OriginByResourceId::const_iterator found = right.find(itr->second); |
| 305 if (found == right.end() || found->second != itr->first) | 305 if (found == right.end() || found->second != itr->first) |
| 306 return false; | 306 return false; |
| 307 } | 307 } |
| 308 return true; | 308 return true; |
| 309 } | 309 } |
| 310 | 310 |
| 311 base::ScopedTempDir base_dir_; | 311 base::ScopedTempDir base_dir_; |
| 312 | 312 |
| 313 MessageLoop message_loop_; | 313 base::MessageLoop message_loop_; |
| 314 scoped_ptr<base::Thread> file_thread_; | 314 scoped_ptr<base::Thread> file_thread_; |
| 315 | 315 |
| 316 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; | 316 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; |
| 317 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; | 317 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; |
| 318 | 318 |
| 319 scoped_ptr<DriveMetadataStore> drive_metadata_store_; | 319 scoped_ptr<DriveMetadataStore> drive_metadata_store_; |
| 320 | 320 |
| 321 bool created_; | 321 bool created_; |
| 322 | 322 |
| 323 DISALLOW_COPY_AND_ASSIGN(DriveMetadataStoreTest); | 323 DISALLOW_COPY_AND_ASSIGN(DriveMetadataStoreTest); |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 metadata_store()->AddIncrementalSyncOrigin(kOrigin1, kResourceId1); | 679 metadata_store()->AddIncrementalSyncOrigin(kOrigin1, kResourceId1); |
| 680 VerifyIncrementalSyncOrigin(kOrigin1, kResourceId1); | 680 VerifyIncrementalSyncOrigin(kOrigin1, kResourceId1); |
| 681 VerifyReverseMap(); | 681 VerifyReverseMap(); |
| 682 | 682 |
| 683 metadata_store()->SetOriginRootDirectory(kOrigin1, kResourceId2); | 683 metadata_store()->SetOriginRootDirectory(kOrigin1, kResourceId2); |
| 684 VerifyIncrementalSyncOrigin(kOrigin1, kResourceId2); | 684 VerifyIncrementalSyncOrigin(kOrigin1, kResourceId2); |
| 685 VerifyReverseMap(); | 685 VerifyReverseMap(); |
| 686 } | 686 } |
| 687 | 687 |
| 688 } // namespace sync_file_system | 688 } // namespace sync_file_system |
| OLD | NEW |