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/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/threading/sequenced_worker_pool.h" | 8 #include "base/threading/sequenced_worker_pool.h" |
9 #include "chrome/browser/chromeos/drive/change_list_loader.h" | 9 #include "chrome/browser/chromeos/drive/change_list_loader.h" |
10 #include "chrome/browser/chromeos/drive/drive_cache.h" | 10 #include "chrome/browser/chromeos/drive/drive_cache.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 virtual void OnDirectoryChangedByOperation( | 104 virtual void OnDirectoryChangedByOperation( |
105 const base::FilePath& directory_path) OVERRIDE { | 105 const base::FilePath& directory_path) OVERRIDE { |
106 // Do nothing. | 106 // Do nothing. |
107 } | 107 } |
108 | 108 |
109 bool LoadRootFeedDocument(const std::string& filename) { | 109 bool LoadRootFeedDocument(const std::string& filename) { |
110 return test_util::LoadChangeFeed(filename, | 110 return test_util::LoadChangeFeed(filename, |
111 change_list_loader_.get(), | 111 change_list_loader_.get(), |
112 false, // is_delta_feed | 112 false, // is_delta_feed |
| 113 fake_drive_service_->GetRootResourceId(), |
113 0); | 114 0); |
114 } | 115 } |
115 | 116 |
116 CreateDirectoryOperation* operation() const { | 117 CreateDirectoryOperation* operation() const { |
117 return operation_.get(); | 118 return operation_.get(); |
118 } | 119 } |
119 | 120 |
120 private: | 121 private: |
121 MessageLoopForUI message_loop_; | 122 MessageLoopForUI message_loop_; |
122 // The order of the test threads is important, do not change the order. | 123 // The order of the test threads is important, do not change the order. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 base::FilePath(FILE_PATH_LITERAL("drive/Directory 1")), | 194 base::FilePath(FILE_PATH_LITERAL("drive/Directory 1")), |
194 base::Bind(&CopyResultFromFindFirstMissingParentDirectory, | 195 base::Bind(&CopyResultFromFindFirstMissingParentDirectory, |
195 &result)); | 196 &result)); |
196 google_apis::test_util::RunBlockingPoolTask(); | 197 google_apis::test_util::RunBlockingPoolTask(); |
197 EXPECT_EQ(CreateDirectoryOperation::FIND_FIRST_DIRECTORY_ALREADY_PRESENT, | 198 EXPECT_EQ(CreateDirectoryOperation::FIND_FIRST_DIRECTORY_ALREADY_PRESENT, |
198 result.error); | 199 result.error); |
199 } | 200 } |
200 | 201 |
201 } // namespace file_system | 202 } // namespace file_system |
202 } // namespace drive | 203 } // namespace drive |
OLD | NEW |