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

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

Issue 2568033002: mediaview: Skeleton for ARC Documents Provider FS. (Closed)
Patch Set: Remove unused weak_ptr_factory_. 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_documents_provider_backend_delegate.cc
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.cc b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d7a531a8989ea29d21dc04c90dff4a56e4b2af3f
--- /dev/null
+++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.cc
@@ -0,0 +1,71 @@
+// 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_documents_provider_backend_delegate.h"
+
+#include <memory>
Yusuke Sato 2016/12/13 18:58:56 nit: remove as the header already has it. https:/
Shuhei Takahashi 2016/12/14 03:24:55 Done.
+#include <utility>
+
+#include "base/logging.h"
+#include "base/memory/ptr_util.h"
Yusuke Sato 2016/12/13 18:58:56 unused?
Shuhei Takahashi 2016/12/14 03:24:55 Done.
+#include "content/public/browser/browser_thread.h"
+#include "storage/browser/fileapi/file_stream_reader.h"
Yusuke Sato 2016/12/13 18:58:56 unused? (L13-14)
Shuhei Takahashi 2016/12/14 03:24:55 Actually they are used: std::unique_ptr<FileStream
+#include "storage/browser/fileapi/file_stream_writer.h"
+#include "url/gurl.h"
+
+using content::BrowserThread;
+
+namespace arc {
+
+ArcDocumentsProviderBackendDelegate::ArcDocumentsProviderBackendDelegate() =
+ default;
+
+ArcDocumentsProviderBackendDelegate::~ArcDocumentsProviderBackendDelegate() {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+}
+
+storage::AsyncFileUtil* ArcDocumentsProviderBackendDelegate::GetAsyncFileUtil(
+ storage::FileSystemType type) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ return &async_file_util_;
+}
+
+std::unique_ptr<storage::FileStreamReader>
+ArcDocumentsProviderBackendDelegate::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(BrowserThread::IO);
+ NOTIMPLEMENTED(); // TODO(crbug.com/671511): Implement this function.
+ return nullptr;
+}
+
+std::unique_ptr<storage::FileStreamWriter>
+ArcDocumentsProviderBackendDelegate::CreateFileStreamWriter(
+ const storage::FileSystemURL& url,
+ int64_t offset,
+ storage::FileSystemContext* context) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ NOTREACHED(); // Read-only file system.
+ return nullptr;
+}
+
+storage::WatcherManager* ArcDocumentsProviderBackendDelegate::GetWatcherManager(
+ storage::FileSystemType type) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ NOTREACHED(); // Non-watchable file system.
+ return nullptr;
+}
+
+void ArcDocumentsProviderBackendDelegate::GetRedirectURLForContents(
+ const storage::FileSystemURL& url,
+ const storage::URLCallback& callback) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ NOTIMPLEMENTED(); // TODO(crbug.com/671511): Implement this function.
+ callback.Run(GURL());
+}
+
+} // namespace arc

Powered by Google App Engine
This is Rietveld 408576698