| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 extensions::EventRouter* event_router) { | 101 extensions::EventRouter* event_router) { |
| 102 event_router_ = event_router; | 102 event_router_ = event_router; |
| 103 } | 103 } |
| 104 | 104 |
| 105 void ProvidedFileSystem::SetNotificationManagerForTesting( | 105 void ProvidedFileSystem::SetNotificationManagerForTesting( |
| 106 scoped_ptr<NotificationManagerInterface> notification_manager) { | 106 scoped_ptr<NotificationManagerInterface> notification_manager) { |
| 107 notification_manager_ = notification_manager.Pass(); | 107 notification_manager_ = notification_manager.Pass(); |
| 108 request_manager_.reset(new RequestManager(notification_manager_.get())); | 108 request_manager_.reset(new RequestManager(notification_manager_.get())); |
| 109 } | 109 } |
| 110 | 110 |
| 111 ProvidedFileSystem::AbortCallback ProvidedFileSystem::RequestUnmount( | 111 AbortCallback ProvidedFileSystem::RequestUnmount( |
| 112 const storage::AsyncFileUtil::StatusCallback& callback) { | 112 const storage::AsyncFileUtil::StatusCallback& callback) { |
| 113 const int request_id = request_manager_->CreateRequest( | 113 const int request_id = request_manager_->CreateRequest( |
| 114 REQUEST_UNMOUNT, | 114 REQUEST_UNMOUNT, |
| 115 scoped_ptr<RequestManager::HandlerInterface>( | 115 scoped_ptr<RequestManager::HandlerInterface>( |
| 116 new operations::Unmount(event_router_, file_system_info_, callback))); | 116 new operations::Unmount(event_router_, file_system_info_, callback))); |
| 117 if (!request_id) { | 117 if (!request_id) { |
| 118 callback.Run(base::File::FILE_ERROR_SECURITY); | 118 callback.Run(base::File::FILE_ERROR_SECURITY); |
| 119 return AbortCallback(); | 119 return AbortCallback(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 return base::Bind( | 122 return base::Bind( |
| 123 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 123 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
| 124 } | 124 } |
| 125 | 125 |
| 126 ProvidedFileSystem::AbortCallback ProvidedFileSystem::GetMetadata( | 126 AbortCallback ProvidedFileSystem::GetMetadata( |
| 127 const base::FilePath& entry_path, | 127 const base::FilePath& entry_path, |
| 128 MetadataFieldMask fields, | 128 MetadataFieldMask fields, |
| 129 const GetMetadataCallback& callback) { | 129 const GetMetadataCallback& callback) { |
| 130 const int request_id = request_manager_->CreateRequest( | 130 const int request_id = request_manager_->CreateRequest( |
| 131 GET_METADATA, | 131 GET_METADATA, |
| 132 scoped_ptr<RequestManager::HandlerInterface>(new operations::GetMetadata( | 132 scoped_ptr<RequestManager::HandlerInterface>(new operations::GetMetadata( |
| 133 event_router_, file_system_info_, entry_path, fields, callback))); | 133 event_router_, file_system_info_, entry_path, fields, callback))); |
| 134 if (!request_id) { | 134 if (!request_id) { |
| 135 callback.Run(make_scoped_ptr<EntryMetadata>(NULL), | 135 callback.Run(make_scoped_ptr<EntryMetadata>(NULL), |
| 136 base::File::FILE_ERROR_SECURITY); | 136 base::File::FILE_ERROR_SECURITY); |
| 137 return AbortCallback(); | 137 return AbortCallback(); |
| 138 } | 138 } |
| 139 | 139 |
| 140 return base::Bind( | 140 return base::Bind( |
| 141 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 141 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
| 142 } | 142 } |
| 143 | 143 |
| 144 ProvidedFileSystem::AbortCallback ProvidedFileSystem::ReadDirectory( | 144 AbortCallback ProvidedFileSystem::ReadDirectory( |
| 145 const base::FilePath& directory_path, | 145 const base::FilePath& directory_path, |
| 146 const storage::AsyncFileUtil::ReadDirectoryCallback& callback) { | 146 const storage::AsyncFileUtil::ReadDirectoryCallback& callback) { |
| 147 const int request_id = request_manager_->CreateRequest( | 147 const int request_id = request_manager_->CreateRequest( |
| 148 READ_DIRECTORY, | 148 READ_DIRECTORY, |
| 149 scoped_ptr<RequestManager::HandlerInterface>( | 149 scoped_ptr<RequestManager::HandlerInterface>( |
| 150 new operations::ReadDirectory( | 150 new operations::ReadDirectory( |
| 151 event_router_, file_system_info_, directory_path, callback))); | 151 event_router_, file_system_info_, directory_path, callback))); |
| 152 if (!request_id) { | 152 if (!request_id) { |
| 153 callback.Run(base::File::FILE_ERROR_SECURITY, | 153 callback.Run(base::File::FILE_ERROR_SECURITY, |
| 154 storage::AsyncFileUtil::EntryList(), | 154 storage::AsyncFileUtil::EntryList(), |
| 155 false /* has_more */); | 155 false /* has_more */); |
| 156 return AbortCallback(); | 156 return AbortCallback(); |
| 157 } | 157 } |
| 158 | 158 |
| 159 return base::Bind( | 159 return base::Bind( |
| 160 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 160 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
| 161 } | 161 } |
| 162 | 162 |
| 163 ProvidedFileSystem::AbortCallback ProvidedFileSystem::ReadFile( | 163 AbortCallback ProvidedFileSystem::ReadFile( |
| 164 int file_handle, | 164 int file_handle, |
| 165 net::IOBuffer* buffer, | 165 net::IOBuffer* buffer, |
| 166 int64 offset, | 166 int64 offset, |
| 167 int length, | 167 int length, |
| 168 const ReadChunkReceivedCallback& callback) { | 168 const ReadChunkReceivedCallback& callback) { |
| 169 TRACE_EVENT1( | 169 TRACE_EVENT1( |
| 170 "file_system_provider", "ProvidedFileSystem::ReadFile", "length", length); | 170 "file_system_provider", "ProvidedFileSystem::ReadFile", "length", length); |
| 171 const int request_id = request_manager_->CreateRequest( | 171 const int request_id = request_manager_->CreateRequest( |
| 172 READ_FILE, | 172 READ_FILE, |
| 173 make_scoped_ptr<RequestManager::HandlerInterface>( | 173 make_scoped_ptr<RequestManager::HandlerInterface>( |
| 174 new operations::ReadFile(event_router_, | 174 new operations::ReadFile(event_router_, |
| 175 file_system_info_, | 175 file_system_info_, |
| 176 file_handle, | 176 file_handle, |
| 177 buffer, | 177 buffer, |
| 178 offset, | 178 offset, |
| 179 length, | 179 length, |
| 180 callback))); | 180 callback))); |
| 181 if (!request_id) { | 181 if (!request_id) { |
| 182 callback.Run(0 /* chunk_length */, | 182 callback.Run(0 /* chunk_length */, |
| 183 false /* has_more */, | 183 false /* has_more */, |
| 184 base::File::FILE_ERROR_SECURITY); | 184 base::File::FILE_ERROR_SECURITY); |
| 185 return AbortCallback(); | 185 return AbortCallback(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 return base::Bind( | 188 return base::Bind( |
| 189 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 189 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
| 190 } | 190 } |
| 191 | 191 |
| 192 ProvidedFileSystem::AbortCallback ProvidedFileSystem::OpenFile( | 192 AbortCallback ProvidedFileSystem::OpenFile(const base::FilePath& file_path, |
| 193 const base::FilePath& file_path, | 193 OpenFileMode mode, |
| 194 OpenFileMode mode, | 194 const OpenFileCallback& callback) { |
| 195 const OpenFileCallback& callback) { | |
| 196 const int request_id = request_manager_->CreateRequest( | 195 const int request_id = request_manager_->CreateRequest( |
| 197 OPEN_FILE, | 196 OPEN_FILE, |
| 198 scoped_ptr<RequestManager::HandlerInterface>(new operations::OpenFile( | 197 scoped_ptr<RequestManager::HandlerInterface>(new operations::OpenFile( |
| 199 event_router_, file_system_info_, file_path, mode, callback))); | 198 event_router_, file_system_info_, file_path, mode, callback))); |
| 200 if (!request_id) { | 199 if (!request_id) { |
| 201 callback.Run(0 /* file_handle */, base::File::FILE_ERROR_SECURITY); | 200 callback.Run(0 /* file_handle */, base::File::FILE_ERROR_SECURITY); |
| 202 return AbortCallback(); | 201 return AbortCallback(); |
| 203 } | 202 } |
| 204 | 203 |
| 205 return base::Bind( | 204 return base::Bind( |
| 206 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 205 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
| 207 } | 206 } |
| 208 | 207 |
| 209 ProvidedFileSystem::AbortCallback ProvidedFileSystem::CloseFile( | 208 AbortCallback ProvidedFileSystem::CloseFile( |
| 210 int file_handle, | 209 int file_handle, |
| 211 const storage::AsyncFileUtil::StatusCallback& callback) { | 210 const storage::AsyncFileUtil::StatusCallback& callback) { |
| 212 const int request_id = request_manager_->CreateRequest( | 211 const int request_id = request_manager_->CreateRequest( |
| 213 CLOSE_FILE, | 212 CLOSE_FILE, |
| 214 scoped_ptr<RequestManager::HandlerInterface>(new operations::CloseFile( | 213 scoped_ptr<RequestManager::HandlerInterface>(new operations::CloseFile( |
| 215 event_router_, file_system_info_, file_handle, callback))); | 214 event_router_, file_system_info_, file_handle, callback))); |
| 216 if (!request_id) { | 215 if (!request_id) { |
| 217 callback.Run(base::File::FILE_ERROR_SECURITY); | 216 callback.Run(base::File::FILE_ERROR_SECURITY); |
| 218 return AbortCallback(); | 217 return AbortCallback(); |
| 219 } | 218 } |
| 220 | 219 |
| 221 return base::Bind( | 220 return base::Bind( |
| 222 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 221 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
| 223 } | 222 } |
| 224 | 223 |
| 225 ProvidedFileSystem::AbortCallback ProvidedFileSystem::CreateDirectory( | 224 AbortCallback ProvidedFileSystem::CreateDirectory( |
| 226 const base::FilePath& directory_path, | 225 const base::FilePath& directory_path, |
| 227 bool recursive, | 226 bool recursive, |
| 228 const storage::AsyncFileUtil::StatusCallback& callback) { | 227 const storage::AsyncFileUtil::StatusCallback& callback) { |
| 229 const int request_id = request_manager_->CreateRequest( | 228 const int request_id = request_manager_->CreateRequest( |
| 230 CREATE_DIRECTORY, | 229 CREATE_DIRECTORY, |
| 231 scoped_ptr<RequestManager::HandlerInterface>( | 230 scoped_ptr<RequestManager::HandlerInterface>( |
| 232 new operations::CreateDirectory(event_router_, | 231 new operations::CreateDirectory(event_router_, |
| 233 file_system_info_, | 232 file_system_info_, |
| 234 directory_path, | 233 directory_path, |
| 235 recursive, | 234 recursive, |
| 236 callback))); | 235 callback))); |
| 237 if (!request_id) { | 236 if (!request_id) { |
| 238 callback.Run(base::File::FILE_ERROR_SECURITY); | 237 callback.Run(base::File::FILE_ERROR_SECURITY); |
| 239 return AbortCallback(); | 238 return AbortCallback(); |
| 240 } | 239 } |
| 241 | 240 |
| 242 return base::Bind( | 241 return base::Bind( |
| 243 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 242 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
| 244 } | 243 } |
| 245 | 244 |
| 246 ProvidedFileSystem::AbortCallback ProvidedFileSystem::DeleteEntry( | 245 AbortCallback ProvidedFileSystem::DeleteEntry( |
| 247 const base::FilePath& entry_path, | 246 const base::FilePath& entry_path, |
| 248 bool recursive, | 247 bool recursive, |
| 249 const storage::AsyncFileUtil::StatusCallback& callback) { | 248 const storage::AsyncFileUtil::StatusCallback& callback) { |
| 250 const int request_id = request_manager_->CreateRequest( | 249 const int request_id = request_manager_->CreateRequest( |
| 251 DELETE_ENTRY, | 250 DELETE_ENTRY, |
| 252 scoped_ptr<RequestManager::HandlerInterface>(new operations::DeleteEntry( | 251 scoped_ptr<RequestManager::HandlerInterface>(new operations::DeleteEntry( |
| 253 event_router_, file_system_info_, entry_path, recursive, callback))); | 252 event_router_, file_system_info_, entry_path, recursive, callback))); |
| 254 if (!request_id) { | 253 if (!request_id) { |
| 255 callback.Run(base::File::FILE_ERROR_SECURITY); | 254 callback.Run(base::File::FILE_ERROR_SECURITY); |
| 256 return AbortCallback(); | 255 return AbortCallback(); |
| 257 } | 256 } |
| 258 | 257 |
| 259 return base::Bind( | 258 return base::Bind( |
| 260 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 259 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
| 261 } | 260 } |
| 262 | 261 |
| 263 ProvidedFileSystem::AbortCallback ProvidedFileSystem::CreateFile( | 262 AbortCallback ProvidedFileSystem::CreateFile( |
| 264 const base::FilePath& file_path, | 263 const base::FilePath& file_path, |
| 265 const storage::AsyncFileUtil::StatusCallback& callback) { | 264 const storage::AsyncFileUtil::StatusCallback& callback) { |
| 266 const int request_id = request_manager_->CreateRequest( | 265 const int request_id = request_manager_->CreateRequest( |
| 267 CREATE_FILE, | 266 CREATE_FILE, |
| 268 scoped_ptr<RequestManager::HandlerInterface>(new operations::CreateFile( | 267 scoped_ptr<RequestManager::HandlerInterface>(new operations::CreateFile( |
| 269 event_router_, file_system_info_, file_path, callback))); | 268 event_router_, file_system_info_, file_path, callback))); |
| 270 if (!request_id) { | 269 if (!request_id) { |
| 271 callback.Run(base::File::FILE_ERROR_SECURITY); | 270 callback.Run(base::File::FILE_ERROR_SECURITY); |
| 272 return AbortCallback(); | 271 return AbortCallback(); |
| 273 } | 272 } |
| 274 | 273 |
| 275 return base::Bind( | 274 return base::Bind( |
| 276 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 275 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
| 277 } | 276 } |
| 278 | 277 |
| 279 ProvidedFileSystem::AbortCallback ProvidedFileSystem::CopyEntry( | 278 AbortCallback ProvidedFileSystem::CopyEntry( |
| 280 const base::FilePath& source_path, | 279 const base::FilePath& source_path, |
| 281 const base::FilePath& target_path, | 280 const base::FilePath& target_path, |
| 282 const storage::AsyncFileUtil::StatusCallback& callback) { | 281 const storage::AsyncFileUtil::StatusCallback& callback) { |
| 283 const int request_id = request_manager_->CreateRequest( | 282 const int request_id = request_manager_->CreateRequest( |
| 284 COPY_ENTRY, | 283 COPY_ENTRY, |
| 285 scoped_ptr<RequestManager::HandlerInterface>( | 284 scoped_ptr<RequestManager::HandlerInterface>( |
| 286 new operations::CopyEntry(event_router_, | 285 new operations::CopyEntry(event_router_, |
| 287 file_system_info_, | 286 file_system_info_, |
| 288 source_path, | 287 source_path, |
| 289 target_path, | 288 target_path, |
| 290 callback))); | 289 callback))); |
| 291 if (!request_id) { | 290 if (!request_id) { |
| 292 callback.Run(base::File::FILE_ERROR_SECURITY); | 291 callback.Run(base::File::FILE_ERROR_SECURITY); |
| 293 return AbortCallback(); | 292 return AbortCallback(); |
| 294 } | 293 } |
| 295 | 294 |
| 296 return base::Bind( | 295 return base::Bind( |
| 297 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 296 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
| 298 } | 297 } |
| 299 | 298 |
| 300 ProvidedFileSystem::AbortCallback ProvidedFileSystem::WriteFile( | 299 AbortCallback ProvidedFileSystem::WriteFile( |
| 301 int file_handle, | 300 int file_handle, |
| 302 net::IOBuffer* buffer, | 301 net::IOBuffer* buffer, |
| 303 int64 offset, | 302 int64 offset, |
| 304 int length, | 303 int length, |
| 305 const storage::AsyncFileUtil::StatusCallback& callback) { | 304 const storage::AsyncFileUtil::StatusCallback& callback) { |
| 306 TRACE_EVENT1("file_system_provider", | 305 TRACE_EVENT1("file_system_provider", |
| 307 "ProvidedFileSystem::WriteFile", | 306 "ProvidedFileSystem::WriteFile", |
| 308 "length", | 307 "length", |
| 309 length); | 308 length); |
| 310 const int request_id = request_manager_->CreateRequest( | 309 const int request_id = request_manager_->CreateRequest( |
| 311 WRITE_FILE, | 310 WRITE_FILE, |
| 312 make_scoped_ptr<RequestManager::HandlerInterface>( | 311 make_scoped_ptr<RequestManager::HandlerInterface>( |
| 313 new operations::WriteFile(event_router_, | 312 new operations::WriteFile(event_router_, |
| 314 file_system_info_, | 313 file_system_info_, |
| 315 file_handle, | 314 file_handle, |
| 316 make_scoped_refptr(buffer), | 315 make_scoped_refptr(buffer), |
| 317 offset, | 316 offset, |
| 318 length, | 317 length, |
| 319 callback))); | 318 callback))); |
| 320 if (!request_id) { | 319 if (!request_id) { |
| 321 callback.Run(base::File::FILE_ERROR_SECURITY); | 320 callback.Run(base::File::FILE_ERROR_SECURITY); |
| 322 return AbortCallback(); | 321 return AbortCallback(); |
| 323 } | 322 } |
| 324 | 323 |
| 325 return base::Bind( | 324 return base::Bind( |
| 326 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 325 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
| 327 } | 326 } |
| 328 | 327 |
| 329 ProvidedFileSystem::AbortCallback ProvidedFileSystem::MoveEntry( | 328 AbortCallback ProvidedFileSystem::MoveEntry( |
| 330 const base::FilePath& source_path, | 329 const base::FilePath& source_path, |
| 331 const base::FilePath& target_path, | 330 const base::FilePath& target_path, |
| 332 const storage::AsyncFileUtil::StatusCallback& callback) { | 331 const storage::AsyncFileUtil::StatusCallback& callback) { |
| 333 const int request_id = request_manager_->CreateRequest( | 332 const int request_id = request_manager_->CreateRequest( |
| 334 MOVE_ENTRY, | 333 MOVE_ENTRY, |
| 335 scoped_ptr<RequestManager::HandlerInterface>( | 334 scoped_ptr<RequestManager::HandlerInterface>( |
| 336 new operations::MoveEntry(event_router_, | 335 new operations::MoveEntry(event_router_, |
| 337 file_system_info_, | 336 file_system_info_, |
| 338 source_path, | 337 source_path, |
| 339 target_path, | 338 target_path, |
| 340 callback))); | 339 callback))); |
| 341 if (!request_id) { | 340 if (!request_id) { |
| 342 callback.Run(base::File::FILE_ERROR_SECURITY); | 341 callback.Run(base::File::FILE_ERROR_SECURITY); |
| 343 return AbortCallback(); | 342 return AbortCallback(); |
| 344 } | 343 } |
| 345 | 344 |
| 346 return base::Bind( | 345 return base::Bind( |
| 347 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 346 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
| 348 } | 347 } |
| 349 | 348 |
| 350 ProvidedFileSystem::AbortCallback ProvidedFileSystem::Truncate( | 349 AbortCallback ProvidedFileSystem::Truncate( |
| 351 const base::FilePath& file_path, | 350 const base::FilePath& file_path, |
| 352 int64 length, | 351 int64 length, |
| 353 const storage::AsyncFileUtil::StatusCallback& callback) { | 352 const storage::AsyncFileUtil::StatusCallback& callback) { |
| 354 const int request_id = request_manager_->CreateRequest( | 353 const int request_id = request_manager_->CreateRequest( |
| 355 TRUNCATE, | 354 TRUNCATE, |
| 356 scoped_ptr<RequestManager::HandlerInterface>(new operations::Truncate( | 355 scoped_ptr<RequestManager::HandlerInterface>(new operations::Truncate( |
| 357 event_router_, file_system_info_, file_path, length, callback))); | 356 event_router_, file_system_info_, file_path, length, callback))); |
| 358 if (!request_id) { | 357 if (!request_id) { |
| 359 callback.Run(base::File::FILE_ERROR_SECURITY); | 358 callback.Run(base::File::FILE_ERROR_SECURITY); |
| 360 return AbortCallback(); | 359 return AbortCallback(); |
| 361 } | 360 } |
| 362 | 361 |
| 363 return base::Bind( | 362 return base::Bind( |
| 364 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); | 363 &ProvidedFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), request_id); |
| 365 } | 364 } |
| 366 | 365 |
| 367 ProvidedFileSystem::AbortCallback ProvidedFileSystem::AddWatcher( | 366 AbortCallback ProvidedFileSystem::AddWatcher( |
| 368 const GURL& origin, | 367 const GURL& origin, |
| 369 const base::FilePath& entry_path, | 368 const base::FilePath& entry_path, |
| 370 bool recursive, | 369 bool recursive, |
| 371 bool persistent, | 370 bool persistent, |
| 372 const storage::AsyncFileUtil::StatusCallback& callback, | 371 const storage::AsyncFileUtil::StatusCallback& callback, |
| 373 const storage::WatcherManager::NotificationCallback& | 372 const storage::WatcherManager::NotificationCallback& |
| 374 notification_callback) { | 373 notification_callback) { |
| 375 // TODO(mtomasz): Wrap the entire method body with an asynchronous queue to | 374 // TODO(mtomasz): Wrap the entire method body with an asynchronous queue to |
| 376 // avoid races. | 375 // avoid races. |
| 377 if (persistent && (!file_system_info_.supports_notify_tag() || | 376 if (persistent && (!file_system_info_.supports_notify_tag() || |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 recursive, | 640 recursive, |
| 642 base::Bind(&EmptyStatusCallback)); | 641 base::Bind(&EmptyStatusCallback)); |
| 643 } | 642 } |
| 644 } | 643 } |
| 645 | 644 |
| 646 callback.Run(base::File::FILE_OK); | 645 callback.Run(base::File::FILE_OK); |
| 647 } | 646 } |
| 648 | 647 |
| 649 } // namespace file_system_provider | 648 } // namespace file_system_provider |
| 650 } // namespace chromeos | 649 } // namespace chromeos |
| OLD | NEW |