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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "extensions/shell/browser/api/file_system/shell_file_system_delegate.h"
6
7 #include "apps/saved_files_service.h"
8 #include "base/callback.h"
9 #include "base/files/file_path.h"
10 #include "base/logging.h"
11 #include "extensions/browser/api/file_system/saved_files_service_interface.h"
12
13 namespace extensions {
14
15 ShellFileSystemDelegate::ShellFileSystemDelegate() = default;
16
17 ShellFileSystemDelegate::~ShellFileSystemDelegate() {}
18
19 base::FilePath ShellFileSystemDelegate::GetDefaultDirectory() {
20 NOTIMPLEMENTED();
21 return base::FilePath();
22 }
23
24 bool ShellFileSystemDelegate::ShowSelectFileDialog(
25 scoped_refptr<UIThreadExtensionFunction> extension_function,
26 ui::SelectFileDialog::Type type,
27 const base::FilePath& default_path,
28 const ui::SelectFileDialog::FileTypeInfo* file_types,
29 FileSystemDelegate::FilesSelectedCallback files_selected_callback,
30 base::OnceClosure file_selection_canceled_callback) {
31 NOTIMPLEMENTED();
32
33 // Run the cancel callback by default.
34 std::move(file_selection_canceled_callback).Run();
35
36 // Return true since this isn't a disallowed call, just not implemented.
37 return true;
38 }
39
40 void ShellFileSystemDelegate::ConfirmSensitiveDirectoryAccess(
41 bool has_write_permission,
42 const base::string16& app_name,
43 content::WebContents* web_contents,
44 const base::Closure& on_accept,
45 const base::Closure& on_cancel) {
46 NOTIMPLEMENTED();
47
48 // Run the cancel callback by default.
49 on_cancel.Run();
50 }
51
52 int ShellFileSystemDelegate::GetDescriptionIdForAcceptType(
53 const std::string& accept_type) {
54 NOTIMPLEMENTED();
55 return 0;
56 }
57
58 SavedFilesServiceInterface* ShellFileSystemDelegate::GetSavedFilesService(
59 content::BrowserContext* browser_context) {
60 return apps::SavedFilesService::Get(browser_context);
61 }
62
63 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698