Implement App-Scoped Security scoped bookmarks (#11711)

* implementation of security scoped bookmarks

* option is now only available on mas builds
This commit is contained in:
acheronfail 2018-02-13 05:25:06 +11:00 committed by shelley vohr
parent 9f78ef0179
commit d1d50a4c92
11 changed files with 226 additions and 42 deletions

View file

@ -53,7 +53,13 @@ class FileSelectHelper : public base::RefCounted<FileSelectHelper>,
~FileSelectHelper() override {}
void OnOpenDialogDone(bool result, const std::vector<base::FilePath>& paths) {
#if defined(MAS_BUILD)
void OnOpenDialogDone(bool result, const std::vector<base::FilePath>& paths,
const std::vector<std::string>& bookmarks)
#else
void OnOpenDialogDone(bool result, const std::vector<base::FilePath>& paths)
#endif
{
std::vector<content::FileChooserFileInfo> file_info;
if (result) {
for (auto& path : paths) {
@ -73,7 +79,13 @@ class FileSelectHelper : public base::RefCounted<FileSelectHelper>,
OnFilesSelected(file_info);
}
void OnSaveDialogDone(bool result, const base::FilePath& path) {
#if defined(MAS_BUILD)
void OnSaveDialogDone(bool result, const base::FilePath& path,
const std::string& bookmark)
#else
void OnSaveDialogDone(bool result, const base::FilePath& path)
#endif
{
std::vector<content::FileChooserFileInfo> file_info;
if (result) {
content::FileChooserFileInfo info;