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

Unified Diff: extensions/browser/api/file_system/saved_file_entry.h

Issue 2960433002: SavedFilesServiceInterface in //extensions (Closed)
Patch Set: rebase Created 3 years, 6 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 | « extensions/browser/api/file_system/BUILD.gn ('k') | extensions/browser/api/file_system/saved_file_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/file_system/saved_file_entry.h
diff --git a/extensions/browser/api/file_system/saved_file_entry.h b/extensions/browser/api/file_system/saved_file_entry.h
new file mode 100644
index 0000000000000000000000000000000000000000..ad8bc92dc7c074f11829ca298f0830deebef4543
--- /dev/null
+++ b/extensions/browser/api/file_system/saved_file_entry.h
@@ -0,0 +1,40 @@
+// Copyright 2017 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.
+
+#ifndef EXTENSIONS_BROWSER_API_FILE_SYSTEM_SAVED_FILE_ENTRY_H_
+#define EXTENSIONS_BROWSER_API_FILE_SYSTEM_SAVED_FILE_ENTRY_H_
+
+#include <string>
+
+#include "base/files/file_path.h"
+
+namespace extensions {
+
+// Represents a file entry that a user has given an app permission to
+// access. Must be serializable for persisting to disk.
+struct SavedFileEntry {
+ SavedFileEntry();
+
+ SavedFileEntry(const std::string& id,
+ const base::FilePath& path,
+ bool is_directory,
+ int sequence_number);
+
+ // The opaque id of this file entry.
+ std::string id;
+
+ // The path to a file entry that the app had permission to access.
+ base::FilePath path;
+
+ // Whether or not the entry refers to a directory.
+ bool is_directory;
+
+ // The sequence number in the LRU of the file entry. The value 0 indicates
+ // that the entry is not in the LRU.
+ int sequence_number;
+};
+
+} // namespace extensions
+
+#endif // EXTENSIONS_BROWSER_API_FILE_SYSTEM_SAVED_FILE_ENTRY_H_
« no previous file with comments | « extensions/browser/api/file_system/BUILD.gn ('k') | extensions/browser/api/file_system/saved_file_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698