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

Unified Diff: chrome/browser/ui/webui/extensions/command_handler.cc

Issue 11820041: Remove profile-keyed factory boilerplates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 7 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: chrome/browser/ui/webui/extensions/command_handler.cc
diff --git a/chrome/browser/ui/webui/extensions/command_handler.cc b/chrome/browser/ui/webui/extensions/command_handler.cc
index 02a272987d2790483629f65374c5817d55926c43..59edb787dec3871f5d206a16bd0c08542e55709e 100644
--- a/chrome/browser/ui/webui/extensions/command_handler.cc
+++ b/chrome/browser/ui/webui/extensions/command_handler.cc
@@ -7,7 +7,6 @@
#include "base/bind.h"
#include "base/values.h"
#include "chrome/browser/extensions/api/commands/command_service.h"
-#include "chrome/browser/extensions/api/commands/command_service_factory.h"
#include "chrome/browser/extensions/extension_keybinding_registry.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
@@ -92,8 +91,7 @@ void CommandHandler::HandleSetExtensionCommandShortcut(
}
Profile* profile = Profile::FromWebUI(web_ui());
- CommandService* command_service =
- CommandServiceFactory::GetForProfile(profile);
+ CommandService* command_service = CommandService::Get(profile);
command_service->UpdateKeybindingPrefs(extension_id, command_name, keystroke);
UpdateCommandDataOnPage();
@@ -109,8 +107,7 @@ void CommandHandler::GetAllCommands(base::DictionaryValue* commands) {
ListValue* results = new ListValue;
Profile* profile = Profile::FromWebUI(web_ui());
- CommandService* command_service =
- CommandServiceFactory::GetForProfile(profile);
+ CommandService* command_service = CommandService::Get(profile);
const ExtensionSet* extensions = extensions::ExtensionSystem::Get(profile)->
extension_service()->extensions();
« no previous file with comments | « chrome/browser/ui/views/location_bar/page_action_image_view.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698