-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors
// 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 "components/keyed_service/content/browser_context_dependency_manager.h"
#include "content/public/browser/browser_context.h"
+#include "extensions/browser/extension_host_registry.h"
#include "extensions/browser/extensions_browser_client.h"
namespace apps {
SavedFilesServiceFactory::SavedFilesServiceFactory()
: BrowserContextKeyedServiceFactory(
"SavedFilesService",
- BrowserContextDependencyManager::GetInstance()) {}
+ BrowserContextDependencyManager::GetInstance()) {
+ DependsOn(extensions::ExtensionHostRegistry::GetFactory());
+}
SavedFilesServiceFactory::~SavedFilesServiceFactory() = default;
// is to make this service available in guest sessions, where it could be used
// when apps white-listed in guest sessions attempt to use chrome.fileSystem
// API.
- return extensions::ExtensionsBrowserClient::Get()->GetOriginalContext(
- context);
+ return extensions::ExtensionsBrowserClient::Get()
+ ->GetContextRedirectedToOriginal(context, /*force_guest_profile=*/true);
}
} // namespace apps