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

Unified Diff: components/filesystem/file_system_impl.h

Issue 1718123004: mojo filesystem: Further clean ups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jam comments Created 4 years, 10 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
« no previous file with comments | « components/filesystem/file_system_app.cc ('k') | components/filesystem/file_system_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/filesystem/file_system_impl.h
diff --git a/components/filesystem/file_system_impl.h b/components/filesystem/file_system_impl.h
index 4c18dd562cfe39aff61b94c69f98275f62e6f8d7..f7a1366f3593cf9a99bf21565d45b2f14a174a17 100644
--- a/components/filesystem/file_system_impl.h
+++ b/components/filesystem/file_system_impl.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_FILESYSTEM_FILE_SYSTEM_IMPL_H_
#define COMPONENTS_FILESYSTEM_FILE_SYSTEM_IMPL_H_
+#include "base/files/file_path.h"
#include "base/macros.h"
#include "components/filesystem/public/interfaces/file_system.mojom.h"
#include "mojo/public/cpp/bindings/interface_request.h"
@@ -23,38 +24,32 @@ class FileSystemApp;
class LockTable;
+// The base implementation of FileSystemImpl.
class FileSystemImpl : public FileSystem {
public:
+ // |persistent_dir| is the directory served to callers of
+ // |OpenPersistentFileSystem().
FileSystemImpl(mojo::Connection* connection,
mojo::InterfaceRequest<FileSystem> request,
+ base::FilePath persistent_dir,
LockTable* lock_table);
~FileSystemImpl() override;
// |Files| implementation:
-
- // Current valid values for |file_system| are "temp" for a temporary
- // filesystem and "origin" for a persistent filesystem bound to the origin of
- // the URL of the caller.
- void OpenFileSystem(const mojo::String& file_system,
- mojo::InterfaceRequest<Directory> directory,
- FileSystemClientPtr client,
- const OpenFileSystemCallback& callback) override;
+ void OpenTempDirectory(
+ mojo::InterfaceRequest<Directory> directory,
+ const OpenTempDirectoryCallback& callback) override;
+ void OpenPersistentFileSystem(
+ mojo::InterfaceRequest<Directory> directory,
+ const OpenPersistentFileSystemCallback& callback) override;
private:
- // Gets the system specific toplevel profile directory.
- base::FilePath GetSystemProfileDir() const;
-
- // Takes the origin string from |remote_application_url_|.
- std::string GetOriginFromRemoteApplicationURL() const;
-
- // Sanitizes |origin| so it is an acceptable filesystem name.
- void BuildSanitizedOrigin(const std::string& origin,
- std::string* sanitized_origin);
-
const std::string remote_application_url_;
mojo::StrongBinding<FileSystem> binding_;
LockTable* lock_table_;
+ base::FilePath persistent_dir_;
+
DISALLOW_COPY_AND_ASSIGN(FileSystemImpl);
};
« no previous file with comments | « components/filesystem/file_system_app.cc ('k') | components/filesystem/file_system_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698