OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/fileapi/file_system_backend.h" | 5 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "chrome/browser/chromeos/fileapi/file_access_permissions.h" | 10 #include "chrome/browser/chromeos/fileapi/file_access_permissions.h" |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 *error_code = base::File::FILE_ERROR_SECURITY; | 288 *error_code = base::File::FILE_ERROR_SECURITY; |
289 return NULL; | 289 return NULL; |
290 } | 290 } |
291 | 291 |
292 if (url.type() == storage::kFileSystemTypeDeviceMediaAsFileStorage) { | 292 if (url.type() == storage::kFileSystemTypeDeviceMediaAsFileStorage) { |
293 // MTP file operations run on MediaTaskRunner. | 293 // MTP file operations run on MediaTaskRunner. |
294 return storage::FileSystemOperation::Create( | 294 return storage::FileSystemOperation::Create( |
295 url, | 295 url, |
296 context, | 296 context, |
297 make_scoped_ptr(new storage::FileSystemOperationContext( | 297 make_scoped_ptr(new storage::FileSystemOperationContext( |
298 context, MediaFileSystemBackend::MediaTaskRunner()))); | 298 context, MediaFileSystemBackend::MediaTaskRunner().get()))); |
299 } | 299 } |
300 | 300 |
301 DCHECK(url.type() == storage::kFileSystemTypeNativeLocal || | 301 DCHECK(url.type() == storage::kFileSystemTypeNativeLocal || |
302 url.type() == storage::kFileSystemTypeRestrictedNativeLocal || | 302 url.type() == storage::kFileSystemTypeRestrictedNativeLocal || |
303 url.type() == storage::kFileSystemTypeDrive || | 303 url.type() == storage::kFileSystemTypeDrive || |
304 url.type() == storage::kFileSystemTypeProvided); | 304 url.type() == storage::kFileSystemTypeProvided); |
305 return storage::FileSystemOperation::Create( | 305 return storage::FileSystemOperation::Create( |
306 url, | 306 url, |
307 context, | 307 context, |
308 make_scoped_ptr(new storage::FileSystemOperationContext(context))); | 308 make_scoped_ptr(new storage::FileSystemOperationContext(context))); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 case storage::kFileSystemTypeRestrictedNativeLocal: | 425 case storage::kFileSystemTypeRestrictedNativeLocal: |
426 callback.Run(GURL()); | 426 callback.Run(GURL()); |
427 return; | 427 return; |
428 default: | 428 default: |
429 NOTREACHED(); | 429 NOTREACHED(); |
430 } | 430 } |
431 callback.Run(GURL()); | 431 callback.Run(GURL()); |
432 } | 432 } |
433 | 433 |
434 } // namespace chromeos | 434 } // namespace chromeos |
OLD | NEW |