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

Unified Diff: extensions/shell/browser/api/file_system/shell_file_system_delegate.cc

Issue 2962793002: AppShell: Enable chrome.fileSystem.retainEntry/restoreEntry (Closed)
Patch Set: Remove extraneous DEPS Created 3 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: extensions/shell/browser/api/file_system/shell_file_system_delegate.cc
diff --git a/extensions/shell/browser/api/file_system/shell_file_system_delegate.cc b/extensions/shell/browser/api/file_system/shell_file_system_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..58035a3503325c4c8be1b0d6afe3fb7fbe6ef04b
--- /dev/null
+++ b/extensions/shell/browser/api/file_system/shell_file_system_delegate.cc
@@ -0,0 +1,63 @@
+// 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.
+
+#include "extensions/shell/browser/api/file_system/shell_file_system_delegate.h"
+
+#include "apps/saved_files_service.h"
+#include "base/callback.h"
+#include "base/files/file_path.h"
+#include "base/logging.h"
+#include "extensions/browser/api/file_system/saved_files_service_interface.h"
+
+namespace extensions {
+
+ShellFileSystemDelegate::ShellFileSystemDelegate() = default;
+
+ShellFileSystemDelegate::~ShellFileSystemDelegate() {}
+
+base::FilePath ShellFileSystemDelegate::GetDefaultDirectory() {
+ NOTIMPLEMENTED();
+ return base::FilePath();
+}
+
+bool ShellFileSystemDelegate::ShowSelectFileDialog(
+ scoped_refptr<UIThreadExtensionFunction> extension_function,
+ ui::SelectFileDialog::Type type,
+ const base::FilePath& default_path,
+ const ui::SelectFileDialog::FileTypeInfo* file_types,
+ FileSystemDelegate::FilesSelectedCallback files_selected_callback,
+ base::OnceClosure file_selection_canceled_callback) {
+ NOTIMPLEMENTED();
+
+ // Run the cancel callback by default.
+ std::move(file_selection_canceled_callback).Run();
+
+ // Return true since this isn't a disallowed call, just not implemented.
+ return true;
+}
+
+void ShellFileSystemDelegate::ConfirmSensitiveDirectoryAccess(
+ bool has_write_permission,
+ const base::string16& app_name,
+ content::WebContents* web_contents,
+ const base::Closure& on_accept,
+ const base::Closure& on_cancel) {
+ NOTIMPLEMENTED();
+
+ // Run the cancel callback by default.
+ on_cancel.Run();
+}
+
+int ShellFileSystemDelegate::GetDescriptionIdForAcceptType(
+ const std::string& accept_type) {
+ NOTIMPLEMENTED();
+ return 0;
+}
+
+SavedFilesServiceInterface* ShellFileSystemDelegate::GetSavedFilesService(
+ content::BrowserContext* browser_context) {
+ return apps::SavedFilesService::Get(browser_context);
+}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698