OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/file_system/create_directory_operation.h
" | 5 #include "chrome/browser/chromeos/drive/file_system/create_directory_operation.h
" |
6 | 6 |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/threading/sequenced_worker_pool.h" | 9 #include "base/threading/sequenced_worker_pool.h" |
10 #include "chrome/browser/chromeos/drive/change_list_loader.h" | 10 #include "chrome/browser/chromeos/drive/change_list_loader.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 virtual void OnDirectoryChangedByOperation( | 86 virtual void OnDirectoryChangedByOperation( |
87 const base::FilePath& directory_path) OVERRIDE { | 87 const base::FilePath& directory_path) OVERRIDE { |
88 // Do nothing. | 88 // Do nothing. |
89 } | 89 } |
90 | 90 |
91 CreateDirectoryOperation* operation() const { | 91 CreateDirectoryOperation* operation() const { |
92 return operation_.get(); | 92 return operation_.get(); |
93 } | 93 } |
94 | 94 |
95 private: | 95 private: |
96 MessageLoopForUI message_loop_; | 96 base::MessageLoopForUI message_loop_; |
97 // The order of the test threads is important, do not change the order. | 97 // The order of the test threads is important, do not change the order. |
98 // See also content/browser/browser_thread_impl.cc. | 98 // See also content/browser/browser_thread_impl.cc. |
99 content::TestBrowserThread ui_thread_; | 99 content::TestBrowserThread ui_thread_; |
100 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 100 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
101 | 101 |
102 scoped_ptr<TestingProfile> profile_; | 102 scoped_ptr<TestingProfile> profile_; |
103 base::ScopedTempDir temp_dir_; | 103 base::ScopedTempDir temp_dir_; |
104 | 104 |
105 scoped_ptr<google_apis::FakeDriveService> fake_drive_service_; | 105 scoped_ptr<google_apis::FakeDriveService> fake_drive_service_; |
106 scoped_ptr<DriveResourceMetadata, test_util::DestroyHelperForTests> metadata_; | 106 scoped_ptr<DriveResourceMetadata, test_util::DestroyHelperForTests> metadata_; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 operation()->FindFirstMissingParentDirectory( | 160 operation()->FindFirstMissingParentDirectory( |
161 base::FilePath(FILE_PATH_LITERAL("drive/root/Directory 1")), | 161 base::FilePath(FILE_PATH_LITERAL("drive/root/Directory 1")), |
162 google_apis::test_util::CreateCopyResultCallback(&result)); | 162 google_apis::test_util::CreateCopyResultCallback(&result)); |
163 google_apis::test_util::RunBlockingPoolTask(); | 163 google_apis::test_util::RunBlockingPoolTask(); |
164 EXPECT_EQ(CreateDirectoryOperation::FIND_FIRST_DIRECTORY_ALREADY_PRESENT, | 164 EXPECT_EQ(CreateDirectoryOperation::FIND_FIRST_DIRECTORY_ALREADY_PRESENT, |
165 result.error); | 165 result.error); |
166 } | 166 } |
167 | 167 |
168 } // namespace file_system | 168 } // namespace file_system |
169 } // namespace drive | 169 } // namespace drive |
OLD | NEW |