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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/fileapi/arc_file_system_service.cc
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_file_system_service.cc b/chrome/browser/chromeos/arc/fileapi/arc_file_system_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..11e02901214ce1564648d02a178140aa523b1a11
--- /dev/null
+++ b/chrome/browser/chromeos/arc/fileapi/arc_file_system_service.cc
@@ -0,0 +1,46 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/arc/fileapi/arc_file_system_service.h"
+
+#include "base/files/file_path.h"
+#include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_url_util.h"
+#include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.h"
+#include "components/arc/arc_bridge_service.h"
+#include "content/public/browser/browser_thread.h"
+#include "storage/browser/fileapi/external_mount_points.h"
+
+using content::BrowserThread;
+
+namespace arc {
+
+ArcFileSystemService::ArcFileSystemService(ArcBridgeService* bridge_service)
+ : ArcService(bridge_service) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+ storage::ExternalMountPoints* mount_points =
+ storage::ExternalMountPoints::GetSystemInstance();
+
+ mount_points->RegisterFileSystem(
+ kContentFileSystemMountPointName, storage::kFileSystemTypeArcContent,
+ storage::FileSystemMountOption(),
+ base::FilePath(kContentFileSystemMountPointPath));
+ mount_points->RegisterFileSystem(
+ kDocumentsProviderMountPointName,
+ storage::kFileSystemTypeArcDocumentsProvider,
+ storage::FileSystemMountOption(),
+ base::FilePath(kDocumentsProviderMountPointPath));
+}
+
+ArcFileSystemService::~ArcFileSystemService() {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+ storage::ExternalMountPoints* mount_points =
+ storage::ExternalMountPoints::GetSystemInstance();
+
+ mount_points->RevokeFileSystem(kContentFileSystemMountPointName);
+ mount_points->RevokeFileSystem(kDocumentsProviderMountPointPath);
+}
+
+} // namespace arc

Powered by Google App Engine
This is Rietveld 408576698