OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/file_system_provider/provided_file_system.h" | 5 #include "chrome/browser/chromeos/file_system_provider/provided_file_system.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 callback.Run(base::File::FILE_ERROR_SECURITY); | 168 callback.Run(base::File::FILE_ERROR_SECURITY); |
169 return AbortCallback(); | 169 return AbortCallback(); |
170 } | 170 } |
171 | 171 |
172 return base::Bind( | 172 return base::Bind( |
173 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 173 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
174 } | 174 } |
175 | 175 |
176 ProvidedFileSystem::AbortCallback ProvidedFileSystem::CreateDirectory( | 176 ProvidedFileSystem::AbortCallback ProvidedFileSystem::CreateDirectory( |
177 const base::FilePath& directory_path, | 177 const base::FilePath& directory_path, |
178 bool exclusive, | |
179 bool recursive, | 178 bool recursive, |
180 const storage::AsyncFileUtil::StatusCallback& callback) { | 179 const storage::AsyncFileUtil::StatusCallback& callback) { |
181 const int request_id = request_manager_.CreateRequest( | 180 const int request_id = request_manager_.CreateRequest( |
182 CREATE_DIRECTORY, | 181 CREATE_DIRECTORY, |
183 scoped_ptr<RequestManager::HandlerInterface>( | 182 scoped_ptr<RequestManager::HandlerInterface>( |
184 new operations::CreateDirectory(event_router_, | 183 new operations::CreateDirectory(event_router_, |
185 file_system_info_, | 184 file_system_info_, |
186 directory_path, | 185 directory_path, |
187 exclusive, | |
188 recursive, | 186 recursive, |
189 callback))); | 187 callback))); |
190 if (!request_id) { | 188 if (!request_id) { |
191 callback.Run(base::File::FILE_ERROR_SECURITY); | 189 callback.Run(base::File::FILE_ERROR_SECURITY); |
192 return AbortCallback(); | 190 return AbortCallback(); |
193 } | 191 } |
194 | 192 |
195 return base::Bind( | 193 return base::Bind( |
196 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 194 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
197 } | 195 } |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 new operations::Abort(event_router_, | 339 new operations::Abort(event_router_, |
342 file_system_info_, | 340 file_system_info_, |
343 operation_request_id, | 341 operation_request_id, |
344 callback)))) { | 342 callback)))) { |
345 callback.Run(base::File::FILE_ERROR_SECURITY); | 343 callback.Run(base::File::FILE_ERROR_SECURITY); |
346 } | 344 } |
347 } | 345 } |
348 | 346 |
349 } // namespace file_system_provider | 347 } // namespace file_system_provider |
350 } // namespace chromeos | 348 } // namespace chromeos |
OLD | NEW |