| Index: chrome/browser/extensions/api/file_system/file_system_apitest.cc
|
| diff --git a/chrome/browser/extensions/api/file_system/file_system_apitest.cc b/chrome/browser/extensions/api/file_system/file_system_apitest.cc
|
| index 19dd525cbc24ecbcde1d002a4f46544ead2a29cf..7914e61c673cf01986b66e806aebc60fd643e435 100644
|
| --- a/chrome/browser/extensions/api/file_system/file_system_apitest.cc
|
| +++ b/chrome/browser/extensions/api/file_system/file_system_apitest.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "apps/saved_files_service.h"
|
| +#include "apps/saved_files_service_impl.h"
|
| #include "base/files/file_util.h"
|
| #include "base/macros.h"
|
| #include "base/path_service.h"
|
| @@ -13,6 +13,7 @@
|
| #include "chrome/browser/extensions/api/file_system/file_system_api.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/common/chrome_paths.h"
|
| +#include "extensions/browser/api/file_system/saved_files_service.h"
|
| #include "extensions/browser/extension_prefs.h"
|
| #include "extensions/browser/extension_registry.h"
|
| #include "extensions/browser/extension_registry_observer.h"
|
| @@ -54,7 +55,7 @@ void SetLastChooseEntryDirectory(const base::FilePath& choose_entry_directory,
|
|
|
| void AddSavedEntry(const base::FilePath& path_to_save,
|
| bool is_directory,
|
| - apps::SavedFilesService* service,
|
| + apps::SavedFilesServiceImpl* service,
|
| const Extension* extension) {
|
| service->RegisterFileEntry(
|
| extension->id(), "magic id", path_to_save, is_directory);
|
| @@ -615,8 +616,9 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiRetainEntry) {
|
| &test_file);
|
| ASSERT_TRUE(RunPlatformAppTest(
|
| "api_test/file_system/retain_entry")) << message_;
|
| - std::vector<apps::SavedFileEntry> file_entries = apps::SavedFilesService::Get(
|
| - profile())->GetAllFileEntries(GetSingleLoadedExtension()->id());
|
| + std::vector<SavedFilesService::Entry> file_entries =
|
| + apps::SavedFilesServiceImpl::Get(profile())->GetAllFileEntries(
|
| + GetSingleLoadedExtension()->id());
|
| ASSERT_EQ(1u, file_entries.size());
|
| EXPECT_EQ(test_file, file_entries[0].path);
|
| EXPECT_EQ(1, file_entries[0].sequence_number);
|
| @@ -631,8 +633,9 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiRetainDirectoryEntry) {
|
| &test_directory);
|
| ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/retain_directory"))
|
| << message_;
|
| - std::vector<apps::SavedFileEntry> file_entries = apps::SavedFilesService::Get(
|
| - profile())->GetAllFileEntries(GetSingleLoadedExtension()->id());
|
| + std::vector<SavedFilesService::Entry> file_entries =
|
| + apps::SavedFilesServiceImpl::Get(profile())->GetAllFileEntries(
|
| + GetSingleLoadedExtension()->id());
|
| ASSERT_EQ(1u, file_entries.size());
|
| EXPECT_EQ(test_directory, file_entries[0].path);
|
| EXPECT_EQ(1, file_entries[0].sequence_number);
|
| @@ -644,11 +647,9 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiRestoreEntry) {
|
| ASSERT_FALSE(test_file.empty());
|
| FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
|
| &test_file);
|
| - AppLoadObserver observer(profile(),
|
| - base::Bind(AddSavedEntry,
|
| - test_file,
|
| - false,
|
| - apps::SavedFilesService::Get(profile())));
|
| + AppLoadObserver observer(
|
| + profile(), base::Bind(AddSavedEntry, test_file, false,
|
| + apps::SavedFilesServiceImpl::Get(profile())));
|
| ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/restore_entry"))
|
| << message_;
|
| }
|
| @@ -659,11 +660,9 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiRestoreDirectoryEntry) {
|
| base::FilePath test_directory = test_file.DirName();
|
| FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
|
| &test_file);
|
| - AppLoadObserver observer(profile(),
|
| - base::Bind(AddSavedEntry,
|
| - test_directory,
|
| - true,
|
| - apps::SavedFilesService::Get(profile())));
|
| + AppLoadObserver observer(
|
| + profile(), base::Bind(AddSavedEntry, test_directory, true,
|
| + apps::SavedFilesServiceImpl::Get(profile())));
|
| ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/restore_directory"))
|
| << message_;
|
| }
|
|
|