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

Unified Diff: apps/app_restore_service_browsertest.cc

Issue 2951003002: SavedFilesService interface in //extensions (Closed)
Patch Set: cleanup Created 3 years, 6 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
« no previous file with comments | « apps/app_restore_service.cc ('k') | apps/browser_context_keyed_service_factories.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/app_restore_service_browsertest.cc
diff --git a/apps/app_restore_service_browsertest.cc b/apps/app_restore_service_browsertest.cc
index 9946a8a87c46881bda7200a6e7e3bf3b37fa3f87..4cbaa89d6ac761f5346a8131372c05e79a136831 100644
--- a/apps/app_restore_service_browsertest.cc
+++ b/apps/app_restore_service_browsertest.cc
@@ -4,13 +4,14 @@
#include "apps/app_restore_service.h"
#include "apps/app_restore_service_factory.h"
-#include "apps/saved_files_service.h"
+#include "apps/saved_files_service_impl.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/apps/app_browsertest_util.h"
#include "chrome/browser/extensions/api/file_system/file_system_api.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_utils.h"
+#include "extensions/browser/api/file_system/saved_files_service.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/notification_types.h"
#include "extensions/common/extension.h"
@@ -20,6 +21,7 @@ using extensions::Extension;
using extensions::ExtensionPrefs;
using extensions::ExtensionSystem;
using extensions::FileSystemChooseEntryFunction;
+using extensions::SavedFilesService;
// TODO(benwells): Move PlatformAppBrowserTest to apps namespace in apps
// component.
@@ -131,9 +133,10 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, FileAccessIsSavedToPrefs) {
"file_access_saved_to_prefs_test", "fileWritten");
ASSERT_TRUE(extension);
- SavedFilesService* saved_files_service = SavedFilesService::Get(profile());
+ SavedFilesServiceImpl* saved_files_service =
benwells 2017/06/22 07:56:09 Hmmm ... getting an Impl class like this looks a b
michaelpg 2017/06/23 20:44:04 Done. It does make the change tighter, thanks. I a
+ SavedFilesServiceImpl::Get(profile());
- std::vector<SavedFileEntry> file_entries =
+ std::vector<SavedFilesService::Entry> file_entries =
saved_files_service->GetAllFileEntries(extension->id());
// One for the read-only file entry and one for the writable file entry.
ASSERT_EQ(2u, file_entries.size());
@@ -177,15 +180,17 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_FileAccessIsRestored) {
ExtensionPrefs* extension_prefs =
ExtensionPrefs::Get(browser()->profile());
- SavedFilesService* saved_files_service = SavedFilesService::Get(profile());
- std::vector<SavedFileEntry> file_entries =
+ SavedFilesServiceImpl* saved_files_service =
+ SavedFilesServiceImpl::Get(profile());
+ std::vector<SavedFilesService::Entry> file_entries =
saved_files_service->GetAllFileEntries(extension->id());
extension_suspended.Wait();
// Simulate a restart by populating the preferences as if the browser didn't
// get time to clean itself up.
extension_prefs->SetExtensionRunning(extension->id(), true);
- for (std::vector<SavedFileEntry>::const_iterator it = file_entries.begin();
+ for (std::vector<SavedFilesService::Entry>::const_iterator it =
+ file_entries.begin();
it != file_entries.end(); ++it) {
saved_files_service->RegisterFileEntry(
extension->id(), it->id, it->path, it->is_directory);
« no previous file with comments | « apps/app_restore_service.cc ('k') | apps/browser_context_keyed_service_factories.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698