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

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

Issue 2470843004: arc: Implement ArcContentFileSystemFileStreamReader::Read/GetLength (Closed)
Patch Set: Remove braces Created 4 years, 1 month 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
index b003e70e682242ba4442c6764dcfea3de6400b49..19abf6caf82636e4868b35601021f98092c79584 100644
--- 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
@@ -4,8 +4,10 @@
#include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_delegate.h"
+#include "base/memory/ptr_util.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 "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_url_util.h"
#include "content/public/browser/browser_thread.h"
#include "storage/browser/fileapi/file_stream_writer.h"
#include "storage/browser/fileapi/file_system_url.h"
@@ -34,8 +36,9 @@ ArcContentFileSystemBackendDelegate::CreateFileStreamReader(
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));
+ GURL arc_url = FileSystemUrlToArcUrl(url);
+ return base::MakeUnique<ArcContentFileSystemFileStreamReader>(arc_url,
+ offset);
}
std::unique_ptr<storage::FileStreamWriter>
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698