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

Unified Diff: chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_delegate.cc

Issue 2411323002: arc: Empty implementation of ARC content file system (Closed)
Patch Set: Address comments Created 4 years, 2 months 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_content_file_system_backend_delegate.cc
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_delegate.cc b/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b003e70e682242ba4442c6764dcfea3de6400b49
--- /dev/null
+++ b/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_delegate.cc
@@ -0,0 +1,62 @@
+// 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_content_file_system_backend_delegate.h"
+
+#include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_async_file_util.h"
+#include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_reader.h"
+#include "content/public/browser/browser_thread.h"
+#include "storage/browser/fileapi/file_stream_writer.h"
+#include "storage/browser/fileapi/file_system_url.h"
+
+namespace arc {
+
+ArcContentFileSystemBackendDelegate::ArcContentFileSystemBackendDelegate()
+ : async_file_util_(new ArcContentFileSystemAsyncFileUtil()) {}
+
+ArcContentFileSystemBackendDelegate::~ArcContentFileSystemBackendDelegate() =
+ default;
+
+storage::AsyncFileUtil* ArcContentFileSystemBackendDelegate::GetAsyncFileUtil(
+ storage::FileSystemType type) {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+ DCHECK_EQ(storage::kFileSystemTypeArcContent, type);
+ return async_file_util_.get();
+}
+
+std::unique_ptr<storage::FileStreamReader>
+ArcContentFileSystemBackendDelegate::CreateFileStreamReader(
+ const storage::FileSystemURL& url,
+ int64_t offset,
+ int64_t max_bytes_to_read,
+ const base::Time& expected_modification_time,
+ storage::FileSystemContext* context) {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+ DCHECK_EQ(storage::kFileSystemTypeArcContent, url.type());
+ return std::unique_ptr<storage::FileStreamReader>(
+ new ArcContentFileSystemFileStreamReader(url, offset, max_bytes_to_read));
+}
+
+std::unique_ptr<storage::FileStreamWriter>
+ArcContentFileSystemBackendDelegate::CreateFileStreamWriter(
+ const storage::FileSystemURL& url,
+ int64_t offset,
+ storage::FileSystemContext* context) {
+ NOTIMPLEMENTED();
+ return std::unique_ptr<storage::FileStreamWriter>();
+}
+
+storage::WatcherManager* ArcContentFileSystemBackendDelegate::GetWatcherManager(
+ storage::FileSystemType type) {
+ NOTIMPLEMENTED();
+ return nullptr;
+}
+
+void ArcContentFileSystemBackendDelegate::GetRedirectURLForContents(
+ const storage::FileSystemURL& url,
+ const storage::URLCallback& callback) {
+ NOTIMPLEMENTED();
+}
+
+} // namespace arc

Powered by Google App Engine
This is Rietveld 408576698