| 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 "chrome/browser/chromeos/drive/sync/entry_update_performer.h" | 5 #include "chrome/browser/chromeos/drive/sync/entry_update_performer.h" |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/md5.h" | 9 #include "base/md5.h" |
| 10 #include "base/task_runner_util.h" | 10 #include "base/task_runner_util.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 class EntryUpdatePerformerTest : public file_system::OperationTestBase { | 25 class EntryUpdatePerformerTest : public file_system::OperationTestBase { |
| 26 protected: | 26 protected: |
| 27 virtual void SetUp() OVERRIDE { | 27 virtual void SetUp() OVERRIDE { |
| 28 OperationTestBase::SetUp(); | 28 OperationTestBase::SetUp(); |
| 29 performer_.reset(new EntryUpdatePerformer(blocking_task_runner(), | 29 performer_.reset(new EntryUpdatePerformer(blocking_task_runner(), |
| 30 observer(), | 30 observer(), |
| 31 scheduler(), | 31 scheduler(), |
| 32 metadata(), | 32 metadata(), |
| 33 cache(), | 33 cache(), |
| 34 change_list_loader())); | 34 loader_controller())); |
| 35 } | 35 } |
| 36 | 36 |
| 37 // Stores |content| to the cache and mark it as dirty. | 37 // Stores |content| to the cache and mark it as dirty. |
| 38 FileError StoreAndMarkDirty(const std::string& local_id, | 38 FileError StoreAndMarkDirty(const std::string& local_id, |
| 39 const std::string& content) { | 39 const std::string& content) { |
| 40 base::FilePath path; | 40 base::FilePath path; |
| 41 if (!base::CreateTemporaryFileInDir(temp_dir(), &path) || | 41 if (!base::CreateTemporaryFileInDir(temp_dir(), &path) || |
| 42 !google_apis::test_util::WriteStringToFile(path, content)) | 42 !google_apis::test_util::WriteStringToFile(path, content)) |
| 43 return FILE_ERROR_FAILED; | 43 return FILE_ERROR_FAILED; |
| 44 | 44 |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 local_id, | 412 local_id, |
| 413 &cache_entry), | 413 &cache_entry), |
| 414 google_apis::test_util::CreateCopyResultCallback(&success)); | 414 google_apis::test_util::CreateCopyResultCallback(&success)); |
| 415 test_util::RunBlockingPoolTask(); | 415 test_util::RunBlockingPoolTask(); |
| 416 EXPECT_TRUE(success); | 416 EXPECT_TRUE(success); |
| 417 EXPECT_FALSE(cache_entry.is_dirty()); | 417 EXPECT_FALSE(cache_entry.is_dirty()); |
| 418 } | 418 } |
| 419 | 419 |
| 420 } // namespace internal | 420 } // namespace internal |
| 421 } // namespace drive | 421 } // namespace drive |
| OLD | NEW |