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

Unified Diff: components/filesystem/file_system_impl.h

Issue 1231493002: mandoline filesystem: Save cookie data to the mojo:filesystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT Created 5 years, 5 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: components/filesystem/file_system_impl.h
diff --git a/components/filesystem/file_system_impl.h b/components/filesystem/file_system_impl.h
index 90ea77d799ffd14ceeb0adaf9f11125f4a7bbcfc..2cda44d555830d9eea431f168e455d3247c8039e 100644
--- a/components/filesystem/file_system_impl.h
+++ b/components/filesystem/file_system_impl.h
@@ -10,27 +10,46 @@
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
+namespace base {
+class FilePath;
+}
+
namespace mojo {
class ApplicationConnection;
}
namespace filesystem {
+class FileSystemApp;
class FileSystemImpl : public FileSystem {
public:
- FileSystemImpl(mojo::ApplicationConnection* connection,
+ FileSystemImpl(FileSystemApp* app,
+ mojo::ApplicationConnection* connection,
mojo::InterfaceRequest<FileSystem> request);
~FileSystemImpl() override;
// |Files| implementation:
- // We provide a "private" temporary file system as the default. In Debug
- // builds, we also provide access to a common file system named "debug"
- // (stored under ~/MojoDebug).
+
+ // 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;
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);
+
+ FileSystemApp* app_;
const std::string remote_application_url_;
mojo::StrongBinding<FileSystem> binding_;

Powered by Google App Engine
This is Rietveld 408576698