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

Side by Side Diff: extensions/shell/browser/shell_extensions_browser_client.cc

Issue 523743005: Fix HidService lifetime issues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: where did that stupid line come from Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « extensions/shell/browser/shell_device_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/shell/browser/shell_extensions_browser_client.h" 5 #include "extensions/shell/browser/shell_extensions_browser_client.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/prefs/pref_service_factory.h" 8 #include "base/prefs/pref_service_factory.h"
9 #include "base/prefs/testing_pref_store.h" 9 #include "base/prefs/testing_pref_store.h"
10 #include "components/pref_registry/pref_registry_syncable.h" 10 #include "components/pref_registry/pref_registry_syncable.h"
11 #include "components/user_prefs/user_prefs.h" 11 #include "components/user_prefs/user_prefs.h"
12 #include "extensions/browser/api/extensions_api_client.h"
12 #include "extensions/browser/api/generated_api_registration.h" 13 #include "extensions/browser/api/generated_api_registration.h"
13 #include "extensions/browser/app_sorting.h" 14 #include "extensions/browser/app_sorting.h"
14 #include "extensions/browser/extension_function_registry.h" 15 #include "extensions/browser/extension_function_registry.h"
15 #include "extensions/browser/extension_prefs.h" 16 #include "extensions/browser/extension_prefs.h"
16 #include "extensions/shell/browser/api/generated_api_registration.h" 17 #include "extensions/shell/browser/api/generated_api_registration.h"
17 #include "extensions/shell/browser/api/shell_extensions_api_client.h"
18 #include "extensions/shell/browser/shell_app_sorting.h" 18 #include "extensions/shell/browser/shell_app_sorting.h"
19 #include "extensions/shell/browser/shell_extension_host_delegate.h" 19 #include "extensions/shell/browser/shell_extension_host_delegate.h"
20 #include "extensions/shell/browser/shell_extension_system_factory.h" 20 #include "extensions/shell/browser/shell_extension_system_factory.h"
21 #include "extensions/shell/browser/shell_runtime_api_delegate.h" 21 #include "extensions/shell/browser/shell_runtime_api_delegate.h"
22 22
23 using content::BrowserContext; 23 using content::BrowserContext;
24 24
25 namespace extensions { 25 namespace extensions {
26 namespace { 26 namespace {
27 27
28 // See chrome::RegisterProfilePrefs() in chrome/browser/prefs/browser_prefs.cc 28 // See chrome::RegisterProfilePrefs() in chrome/browser/prefs/browser_prefs.cc
29 void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry) { 29 void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry) {
30 ExtensionPrefs::RegisterProfilePrefs(registry); 30 ExtensionPrefs::RegisterProfilePrefs(registry);
31 } 31 }
32 32
33 } // namespace 33 } // namespace
34 34
35 ShellExtensionsBrowserClient::ShellExtensionsBrowserClient( 35 ShellExtensionsBrowserClient::ShellExtensionsBrowserClient(
36 BrowserContext* context) 36 BrowserContext* context)
37 : browser_context_(context), api_client_(new ShellExtensionsAPIClient) { 37 : browser_context_(context), api_client_(new ExtensionsAPIClient) {
38 // Set up the preferences service. 38 // Set up the preferences service.
39 base::PrefServiceFactory factory; 39 base::PrefServiceFactory factory;
40 factory.set_user_prefs(new TestingPrefStore); 40 factory.set_user_prefs(new TestingPrefStore);
41 factory.set_extension_prefs(new TestingPrefStore); 41 factory.set_extension_prefs(new TestingPrefStore);
42 // app_shell should not require syncable preferences, but for now we need to 42 // app_shell should not require syncable preferences, but for now we need to
43 // recycle some of the RegisterProfilePrefs() code in Chrome. 43 // recycle some of the RegisterProfilePrefs() code in Chrome.
44 // TODO(jamescook): Convert this to PrefRegistrySimple. 44 // TODO(jamescook): Convert this to PrefRegistrySimple.
45 user_prefs::PrefRegistrySyncable* pref_registry = 45 user_prefs::PrefRegistrySyncable* pref_registry =
46 new user_prefs::PrefRegistrySyncable; 46 new user_prefs::PrefRegistrySyncable;
47 // Prefs should be registered before the PrefService is created. 47 // Prefs should be registered before the PrefService is created.
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 ComponentExtensionResourceManager* 194 ComponentExtensionResourceManager*
195 ShellExtensionsBrowserClient::GetComponentExtensionResourceManager() { 195 ShellExtensionsBrowserClient::GetComponentExtensionResourceManager() {
196 return NULL; 196 return NULL;
197 } 197 }
198 198
199 net::NetLog* ShellExtensionsBrowserClient::GetNetLog() { 199 net::NetLog* ShellExtensionsBrowserClient::GetNetLog() {
200 return NULL; 200 return NULL;
201 } 201 }
202 202
203 } // namespace extensions 203 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_device_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698