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

Unified Diff: chrome/browser/extensions/extension_keybinding_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_keybinding_registry.cc
diff --git a/chrome/browser/extensions/extension_keybinding_registry.cc b/chrome/browser/extensions/extension_keybinding_registry.cc
index b38337668e1da82dc3ac36815a286f1aa6763d06..5217165192fb0a610f733ed5ec60472d141d3242 100644
--- a/chrome/browser/extensions/extension_keybinding_registry.cc
+++ b/chrome/browser/extensions/extension_keybinding_registry.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/extensions/api/commands/command_service.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
+#include "content/public/browser/browser_context.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/extension_set.h"
@@ -18,18 +19,24 @@
namespace extensions {
ExtensionKeybindingRegistry::ExtensionKeybindingRegistry(
- Profile* profile, ExtensionFilter extension_filter, Delegate* delegate)
- : profile_(profile),
+ content::BrowserContext* context,
+ ExtensionFilter extension_filter,
+ Delegate* delegate)
+ : profile_(Profile::FromBrowserContext(context)),
extension_filter_(extension_filter),
delegate_(delegate) {
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- content::Source<Profile>(profile->GetOriginalProfile()));
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- content::Source<Profile>(profile->GetOriginalProfile()));
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_COMMAND_ADDED,
- content::Source<Profile>(profile->GetOriginalProfile()));
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_COMMAND_REMOVED,
- content::Source<Profile>(profile->GetOriginalProfile()));
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_LOADED,
+ content::Source<Profile>(profile_->GetOriginalProfile()));
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_UNLOADED,
+ content::Source<Profile>(profile_->GetOriginalProfile()));
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_COMMAND_ADDED,
+ content::Source<Profile>(profile_->GetOriginalProfile()));
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_COMMAND_REMOVED,
+ content::Source<Profile>(profile_->GetOriginalProfile()));
}
ExtensionKeybindingRegistry::~ExtensionKeybindingRegistry() {

Powered by Google App Engine
This is Rietveld 408576698