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

Unified Diff: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.h

Issue 2572683004: mediaview: Introduce ArcDocumentsProviderRoot. (Closed)
Patch Set: Addressed lhchavez's comments. 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_async_file_util.h
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.h b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.h
index 24037e2fc0a6353f74c26dab893cf4d5a66e0b81..fe48c234d2f8132983a729af37444b6d4bd345bd 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.h
+++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.h
@@ -5,20 +5,22 @@
#ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ASYNC_FILE_UTIL_H_
#define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ASYNC_FILE_UTIL_H_
-#include <memory>
-
#include "base/callback.h"
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
hashimoto 2016/12/16 09:03:52 weak_ptr_factory_ looks unused.
Shuhei Takahashi 2016/12/16 09:42:13 Done.
#include "storage/browser/fileapi/async_file_util.h"
namespace arc {
+class ArcDocumentsProviderRootMap;
+
// The implementation of storage::AsyncFileUtil for media view.
//
// All of the methods must be called on the IO thread.
class ArcDocumentsProviderAsyncFileUtil : public storage::AsyncFileUtil {
public:
- ArcDocumentsProviderAsyncFileUtil();
+ explicit ArcDocumentsProviderAsyncFileUtil(
+ ArcDocumentsProviderRootMap* roots);
~ArcDocumentsProviderAsyncFileUtil() override;
// storage::AsyncFileUtil overrides.
@@ -89,6 +91,11 @@ class ArcDocumentsProviderAsyncFileUtil : public storage::AsyncFileUtil {
const CreateSnapshotFileCallback& callback) override;
private:
+ // Owned by ArcDocumentsProviderBackendDelegate.
+ ArcDocumentsProviderRootMap* const roots_;
+
+ base::WeakPtrFactory<ArcDocumentsProviderAsyncFileUtil> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ArcDocumentsProviderAsyncFileUtil);
};

Powered by Google App Engine
This is Rietveld 408576698