| Index: chrome/browser/extensions/api/file_system/file_system_api.cc
|
| diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc
|
| index 8d5c628b3b36e0d2ba4dbdfb7cea602191b59580..b7324cb1b70a690fdf9ed10a2ba4f2f2beaa08d1 100644
|
| --- a/chrome/browser/extensions/api/file_system/file_system_api.cc
|
| +++ b/chrome/browser/extensions/api/file_system/file_system_api.cc
|
| @@ -11,7 +11,7 @@
|
| #include <utility>
|
| #include <vector>
|
|
|
| -#include "apps/saved_files_service.h"
|
| +#include "apps/saved_files_service_impl.h"
|
| #include "base/bind.h"
|
| #include "base/files/file_path.h"
|
| #include "base/files/file_util.h"
|
| @@ -40,6 +40,7 @@
|
| #include "content/public/browser/storage_partition.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "extensions/browser/api/file_handlers/app_file_handler_util.h"
|
| +#include "extensions/browser/api/file_system/saved_files_service.h"
|
| #include "extensions/browser/app_window/app_window.h"
|
| #include "extensions/browser/app_window/app_window_registry.h"
|
| #include "extensions/browser/extension_prefs.h"
|
| @@ -75,8 +76,7 @@
|
| #include "url/url_constants.h"
|
| #endif
|
|
|
| -using apps::SavedFileEntry;
|
| -using apps::SavedFilesService;
|
| +using apps::SavedFilesServiceImpl;
|
| using storage::IsolatedContext;
|
|
|
| const char kInvalidCallingPage[] =
|
| @@ -923,7 +923,8 @@ bool FileSystemChooseEntryFunction::RunAsync() {
|
| bool FileSystemRetainEntryFunction::RunAsync() {
|
| std::string entry_id;
|
| EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &entry_id));
|
| - SavedFilesService* saved_files_service = SavedFilesService::Get(GetProfile());
|
| + SavedFilesServiceImpl* saved_files_service =
|
| + SavedFilesServiceImpl::Get(GetProfile());
|
| // Add the file to the retain list if it is not already on there.
|
| if (!saved_files_service->IsRegistered(extension_->id(), entry_id)) {
|
| std::string filesystem_name;
|
| @@ -979,7 +980,9 @@ void FileSystemRetainEntryFunction::RetainFileEntry(
|
| return;
|
| }
|
|
|
| - SavedFilesService* saved_files_service = SavedFilesService::Get(GetProfile());
|
| + SavedFilesServiceImpl* saved_files_service =
|
| + SavedFilesServiceImpl::Get(GetProfile());
|
| +
|
| saved_files_service->RegisterFileEntry(extension_->id(), entry_id, path,
|
| file_info->is_directory);
|
| saved_files_service->EnqueueFileEntry(extension_->id(), entry_id);
|
| @@ -990,7 +993,7 @@ ExtensionFunction::ResponseAction FileSystemIsRestorableFunction::Run() {
|
| std::string entry_id;
|
| EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &entry_id));
|
| return RespondNow(OneArgument(base::MakeUnique<base::Value>(
|
| - SavedFilesService::Get(Profile::FromBrowserContext(browser_context()))
|
| + SavedFilesServiceImpl::Get(Profile::FromBrowserContext(browser_context()))
|
| ->IsRegistered(extension_->id(), entry_id))));
|
| }
|
|
|
| @@ -999,15 +1002,15 @@ bool FileSystemRestoreEntryFunction::RunAsync() {
|
| bool needs_new_entry;
|
| EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &entry_id));
|
| EXTENSION_FUNCTION_VALIDATE(args_->GetBoolean(1, &needs_new_entry));
|
| - const SavedFileEntry* file_entry =
|
| - SavedFilesService::Get(GetProfile())
|
| + const SavedFilesService::Entry* file_entry =
|
| + SavedFilesServiceImpl::Get(GetProfile())
|
| ->GetFileEntry(extension_->id(), entry_id);
|
| if (!file_entry) {
|
| error_ = kUnknownIdError;
|
| return false;
|
| }
|
|
|
| - SavedFilesService::Get(GetProfile())
|
| + SavedFilesServiceImpl::Get(GetProfile())
|
| ->EnqueueFileEntry(extension_->id(), entry_id);
|
|
|
| // Only create a new file entry if the renderer requests one.
|
|
|