OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/chromeos/arc/fileapi/arc_file_system_service.h" |
| 6 |
| 7 #include "base/files/file_path.h" |
| 8 #include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_url_util.h
" |
| 9 #include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.h" |
| 10 #include "components/arc/arc_bridge_service.h" |
| 11 #include "content/public/browser/browser_thread.h" |
| 12 #include "storage/browser/fileapi/external_mount_points.h" |
| 13 |
| 14 using content::BrowserThread; |
| 15 |
| 16 namespace arc { |
| 17 |
| 18 ArcFileSystemService::ArcFileSystemService(ArcBridgeService* bridge_service) |
| 19 : ArcService(bridge_service) { |
| 20 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 21 |
| 22 storage::ExternalMountPoints* mount_points = |
| 23 storage::ExternalMountPoints::GetSystemInstance(); |
| 24 |
| 25 mount_points->RegisterFileSystem( |
| 26 kContentFileSystemMountPointName, storage::kFileSystemTypeArcContent, |
| 27 storage::FileSystemMountOption(), |
| 28 base::FilePath(kContentFileSystemMountPointPath)); |
| 29 mount_points->RegisterFileSystem( |
| 30 kDocumentsProviderMountPointName, |
| 31 storage::kFileSystemTypeArcDocumentsProvider, |
| 32 storage::FileSystemMountOption(), |
| 33 base::FilePath(kDocumentsProviderMountPointPath)); |
| 34 } |
| 35 |
| 36 ArcFileSystemService::~ArcFileSystemService() { |
| 37 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 38 |
| 39 storage::ExternalMountPoints* mount_points = |
| 40 storage::ExternalMountPoints::GetSystemInstance(); |
| 41 |
| 42 mount_points->RevokeFileSystem(kContentFileSystemMountPointName); |
| 43 mount_points->RevokeFileSystem(kDocumentsProviderMountPointPath); |
| 44 } |
| 45 |
| 46 } // namespace arc |
OLD | NEW |