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/drive/file_system_backend_delegate.h" | 5 #include "chrome/browser/chromeos/drive/file_system_backend_delegate.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/drive/remote_file_stream_writer.h" | 7 #include "chrome/browser/chromeos/drive/remote_file_stream_writer.h" |
8 #include "chrome/browser/chromeos/fileapi/remote_file_system_operation.h" | 8 #include "chrome/browser/chromeos/fileapi/remote_file_system_operation.h" |
| 9 #include "content/public/browser/browser_context.h" |
9 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
10 #include "webkit/browser/blob/file_stream_reader.h" | 11 #include "webkit/browser/blob/file_stream_reader.h" |
11 #include "webkit/browser/fileapi/external_mount_points.h" | 12 #include "webkit/browser/fileapi/external_mount_points.h" |
12 #include "webkit/browser/fileapi/file_system_task_runners.h" | 13 #include "webkit/browser/fileapi/file_system_task_runners.h" |
13 #include "webkit/browser/fileapi/remote_file_system_proxy.h" | 14 #include "webkit/browser/fileapi/remote_file_system_proxy.h" |
14 | 15 |
15 using content::BrowserThread; | 16 using content::BrowserThread; |
16 | 17 |
17 namespace drive { | 18 namespace drive { |
18 | 19 |
19 FileSystemBackendDelegate::FileSystemBackendDelegate( | 20 FileSystemBackendDelegate::FileSystemBackendDelegate( |
20 fileapi::ExternalMountPoints* mount_points) | 21 content::BrowserContext* browser_context) |
21 : mount_points_(mount_points) { | 22 : mount_points_(content::BrowserContext::GetMountPoints(browser_context)) { |
22 } | 23 } |
23 | 24 |
24 FileSystemBackendDelegate::~FileSystemBackendDelegate() { | 25 FileSystemBackendDelegate::~FileSystemBackendDelegate() { |
25 } | 26 } |
26 | 27 |
27 fileapi::AsyncFileUtil* FileSystemBackendDelegate::GetAsyncFileUtil( | 28 fileapi::AsyncFileUtil* FileSystemBackendDelegate::GetAsyncFileUtil( |
28 fileapi::FileSystemType type) { | 29 fileapi::FileSystemType type) { |
29 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 30 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
30 DCHECK_EQ(fileapi::kFileSystemTypeDrive, type); | 31 DCHECK_EQ(fileapi::kFileSystemTypeDrive, type); |
31 | 32 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 mount_points_->GetRemoteFileSystemProxy(url.filesystem_id()); | 84 mount_points_->GetRemoteFileSystemProxy(url.filesystem_id()); |
84 if (!proxy) { | 85 if (!proxy) { |
85 *error_code = base::PLATFORM_FILE_ERROR_NOT_FOUND; | 86 *error_code = base::PLATFORM_FILE_ERROR_NOT_FOUND; |
86 return NULL; | 87 return NULL; |
87 } | 88 } |
88 | 89 |
89 return new chromeos::RemoteFileSystemOperation(proxy); | 90 return new chromeos::RemoteFileSystemOperation(proxy); |
90 } | 91 } |
91 | 92 |
92 } // namespace drive | 93 } // namespace drive |
OLD | NEW |