| 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/chromeos/drive/sync_client.h" | 5 #include "chrome/browser/chromeos/drive/sync_client.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/prefs/testing_pref_service.h" | 11 #include "base/prefs/testing_pref_service.h" |
| 12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "base/test/test_timeouts.h" | 13 #include "base/test/test_timeouts.h" |
| 14 #include "chrome/browser/chromeos/drive/change_list_loader.h" | 14 #include "chrome/browser/chromeos/drive/change_list_loader.h" |
| 15 #include "chrome/browser/chromeos/drive/change_list_processor.h" | 15 #include "chrome/browser/chromeos/drive/change_list_processor.h" |
| 16 #include "chrome/browser/chromeos/drive/drive.pb.h" | 16 #include "chrome/browser/chromeos/drive/drive.pb.h" |
| 17 #include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h" | 17 #include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h" |
| 18 #include "chrome/browser/chromeos/drive/file_cache.h" | 18 #include "chrome/browser/chromeos/drive/file_cache.h" |
| 19 #include "chrome/browser/chromeos/drive/file_system/move_operation.h" | 19 #include "chrome/browser/chromeos/drive/file_system/move_operation.h" |
| 20 #include "chrome/browser/chromeos/drive/file_system/operation_observer.h" | 20 #include "chrome/browser/chromeos/drive/file_system/operation_observer.h" |
| 21 #include "chrome/browser/chromeos/drive/file_system/remove_operation.h" | 21 #include "chrome/browser/chromeos/drive/file_system/remove_operation.h" |
| 22 #include "chrome/browser/chromeos/drive/file_system_util.h" | 22 #include "chrome/browser/chromeos/drive/file_system_util.h" |
| 23 #include "chrome/browser/chromeos/drive/job_scheduler.h" | 23 #include "chrome/browser/chromeos/drive/job_scheduler.h" |
| 24 #include "chrome/browser/chromeos/drive/resource_entry_conversion.h" | 24 #include "chrome/browser/chromeos/drive/resource_entry_conversion.h" |
| 25 #include "chrome/browser/chromeos/drive/resource_metadata.h" | 25 #include "chrome/browser/chromeos/drive/resource_metadata.h" |
| 26 #include "chrome/browser/chromeos/drive/test_util.h" | 26 #include "chrome/browser/chromeos/drive/test_util.h" |
| 27 #include "chrome/browser/drive/fake_drive_service.h" | 27 #include "chrome/browser/drive/fake_drive_service.h" |
| 28 #include "chrome/browser/google_apis/test_util.h" | |
| 29 #include "content/public/test/test_browser_thread_bundle.h" | 28 #include "content/public/test/test_browser_thread_bundle.h" |
| 29 #include "google_apis/drive/test_util.h" |
| 30 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
| 31 | 31 |
| 32 namespace drive { | 32 namespace drive { |
| 33 namespace internal { | 33 namespace internal { |
| 34 | 34 |
| 35 namespace { | 35 namespace { |
| 36 | 36 |
| 37 // The content of files initially stored in the cache. | 37 // The content of files initially stored in the cache. |
| 38 const char kLocalContent[] = "Hello!"; | 38 const char kLocalContent[] = "Hello!"; |
| 39 | 39 |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 388 |
| 389 // Fetched and uploaded. | 389 // Fetched and uploaded. |
| 390 EXPECT_TRUE(cache_->GetCacheEntry(GetLocalId("foo"), &cache_entry)); | 390 EXPECT_TRUE(cache_->GetCacheEntry(GetLocalId("foo"), &cache_entry)); |
| 391 EXPECT_TRUE(cache_entry.is_present()); | 391 EXPECT_TRUE(cache_entry.is_present()); |
| 392 EXPECT_TRUE(cache_->GetCacheEntry(GetLocalId("dirty"), &cache_entry)); | 392 EXPECT_TRUE(cache_->GetCacheEntry(GetLocalId("dirty"), &cache_entry)); |
| 393 EXPECT_FALSE(cache_entry.is_dirty()); | 393 EXPECT_FALSE(cache_entry.is_dirty()); |
| 394 } | 394 } |
| 395 | 395 |
| 396 } // namespace internal | 396 } // namespace internal |
| 397 } // namespace drive | 397 } // namespace drive |
| OLD | NEW |