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

Unified Diff: apps/shell/shell_extensions_browser_client.cc

Issue 118043003: Fix app_shell shutdown crash due to BrowserContextKeyedServices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ScopedFactoryForTest (shutdown_crash) Created 6 years, 11 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
Index: apps/shell/shell_extensions_browser_client.cc
diff --git a/apps/shell/shell_extensions_browser_client.cc b/apps/shell/shell_extensions_browser_client.cc
index cc59069320a10c158c26953ce29498043c774b26..67af2acdfce97d81977906146d788a3bbe47cd8e 100644
--- a/apps/shell/shell_extensions_browser_client.cc
+++ b/apps/shell/shell_extensions_browser_client.cc
@@ -5,26 +5,28 @@
#include "apps/shell/shell_extensions_browser_client.h"
#include "apps/shell/shell_app_sorting.h"
+#include "apps/shell/shell_extension_system.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/pref_service_factory.h"
#include "base/prefs/testing_pref_store.h"
#include "chrome/browser/extensions/extension_prefs.h"
+#include "chrome/browser/extensions/extension_prefs_factory.h"
#include "components/user_prefs/pref_registry_syncable.h"
#include "components/user_prefs/user_prefs.h"
#include "extensions/browser/app_sorting.h"
using content::BrowserContext;
+namespace extensions {
namespace {
// See chrome::RegisterProfilePrefs() in chrome/browser/prefs/browser_prefs.cc
void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry) {
- extensions::ExtensionPrefs::RegisterProfilePrefs(registry);
+ ExtensionPrefs::RegisterProfilePrefs(registry);
}
} // namespace
-namespace apps {
ShellExtensionsBrowserClient::ShellExtensionsBrowserClient(
BrowserContext* context)
@@ -101,9 +103,8 @@ bool ShellExtensionsBrowserClient::DidVersionUpdate(BrowserContext* context) {
return false;
}
-scoped_ptr<extensions::AppSorting>
-ShellExtensionsBrowserClient::CreateAppSorting() {
- return scoped_ptr<extensions::AppSorting>(new ShellAppSorting).Pass();
+scoped_ptr<AppSorting> ShellExtensionsBrowserClient::CreateAppSorting() {
+ return scoped_ptr<AppSorting>(new apps::ShellAppSorting).Pass();
}
bool ShellExtensionsBrowserClient::IsRunningInForcedAppMode() {
@@ -118,4 +119,16 @@ ShellExtensionsBrowserClient::GetJavaScriptDialogManager() {
return NULL;
}
-} // namespace apps
+std::vector<BrowserContextKeyedServiceFactory*>
+ShellExtensionsBrowserClient::GetExtensionSystemDependencies() {
+ std::vector<BrowserContextKeyedServiceFactory*> depends_on;
+ depends_on.push_back(ExtensionPrefsFactory::GetInstance());
+ return depends_on;
+}
+
+ExtensionSystem* ShellExtensionsBrowserClient::CreateExtensionSystem(
+ BrowserContext* context) {
+ return new ShellExtensionSystem(context);
+}
+
+} // namespace extensions
« no previous file with comments | « apps/shell/shell_extensions_browser_client.h ('k') | chrome/browser/chromeos/drive/drive_integration_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698