Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: chrome/browser/chromeos/arc/fileapi/arc_file_system_service.cc

Issue 2589643002: mediaview: Register ARC documents provider file system. (Closed)
Patch Set: . Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698