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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 base::FilePath(FILE_PATH_LITERAL("drive/Directory 1")), | 196 base::FilePath(FILE_PATH_LITERAL("drive/Directory 1")), |
196 base::Bind(&CopyResultFromFindFirstMissingParentDirectory, | 197 base::Bind(&CopyResultFromFindFirstMissingParentDirectory, |
197 &result)); | 198 &result)); |
198 google_apis::test_util::RunBlockingPoolTask(); | 199 google_apis::test_util::RunBlockingPoolTask(); |
199 EXPECT_EQ(CreateDirectoryOperation::FIND_FIRST_DIRECTORY_ALREADY_PRESENT, | 200 EXPECT_EQ(CreateDirectoryOperation::FIND_FIRST_DIRECTORY_ALREADY_PRESENT, |
200 result.error); | 201 result.error); |
201 } | 202 } |
202 | 203 |
203 } // namespace file_system | 204 } // namespace file_system |
204 } // namespace drive | 205 } // namespace drive |
OLD | NEW |