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

Unified Diff: chrome/browser/extensions/extension_commands_global_registry.cc

Issue 174513003: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 3). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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: chrome/browser/extensions/extension_commands_global_registry.cc
diff --git a/chrome/browser/extensions/extension_commands_global_registry.cc b/chrome/browser/extensions/extension_commands_global_registry.cc
index 24c5b7e68cf4da7041ede4c9825c20a730f12ce2..17b4da0389513f17045eb186b1336fb54aecf28b 100644
--- a/chrome/browser/extensions/extension_commands_global_registry.cc
+++ b/chrome/browser/extensions/extension_commands_global_registry.cc
@@ -7,16 +7,16 @@
#include "base/lazy_instance.h"
#include "chrome/browser/extensions/api/commands/command_service.h"
#include "chrome/browser/extensions/global_shortcut_listener.h"
-#include "chrome/browser/profiles/profile.h"
#include "extensions/common/extension.h"
namespace extensions {
ExtensionCommandsGlobalRegistry::ExtensionCommandsGlobalRegistry(
- Profile* profile)
- : ExtensionKeybindingRegistry(
- profile, ExtensionKeybindingRegistry::ALL_EXTENSIONS, NULL),
- profile_(profile) {
+ content::BrowserContext* context)
+ : ExtensionKeybindingRegistry(context,
+ ExtensionKeybindingRegistry::ALL_EXTENSIONS,
+ NULL),
+ browser_context_(context) {
Init();
}
@@ -39,10 +39,10 @@ ExtensionCommandsGlobalRegistry::GetFactoryInstance() {
}
// static
-ExtensionCommandsGlobalRegistry*
-ExtensionCommandsGlobalRegistry::Get(Profile* profile) {
- return ProfileKeyedAPIFactory<
- ExtensionCommandsGlobalRegistry>::GetForProfile(profile);
+ExtensionCommandsGlobalRegistry* ExtensionCommandsGlobalRegistry::Get(
+ content::BrowserContext* context) {
+ return ProfileKeyedAPIFactory<ExtensionCommandsGlobalRegistry>::GetForProfile(
+ context);
}
void ExtensionCommandsGlobalRegistry::AddExtensionKeybinding(
@@ -53,7 +53,7 @@ void ExtensionCommandsGlobalRegistry::AddExtensionKeybinding(
return;
extensions::CommandService* command_service =
- extensions::CommandService::Get(profile_);
+ extensions::CommandService::Get(browser_context_);
// Add all the active global keybindings, if any.
extensions::CommandMap commands;
if (!command_service->GetNamedCommands(

Powered by Google App Engine
This is Rietveld 408576698