| Index: chrome/browser/extensions/api/commands/command_service.cc
|
| diff --git a/chrome/browser/extensions/api/commands/command_service.cc b/chrome/browser/extensions/api/commands/command_service.cc
|
| index 62a4b37a559d97befb075ab756b0aca0837ab118..7355e76aebf36b372db4b5854164b6411d062758 100644
|
| --- a/chrome/browser/extensions/api/commands/command_service.cc
|
| +++ b/chrome/browser/extensions/api/commands/command_service.cc
|
| @@ -232,37 +232,49 @@ void CommandService::AssignInitialKeybindings(const Extension* extension) {
|
|
|
| extensions::CommandMap::const_iterator iter = commands->begin();
|
| for (; iter != commands->end(); ++iter) {
|
| - AddKeybindingPref(iter->second.accelerator(),
|
| - extension->id(),
|
| - iter->second.command_name(),
|
| - false); // Overwriting not allowed.
|
| + if (!ExtensionKeybindingRegistry::IsChromeAccelerator(
|
| + iter->second.accelerator())) {
|
| + AddKeybindingPref(iter->second.accelerator(),
|
| + extension->id(),
|
| + iter->second.command_name(),
|
| + false); // Overwriting not allowed.
|
| + }
|
| }
|
|
|
| const extensions::Command* browser_action_command =
|
| CommandsInfo::GetBrowserActionCommand(extension);
|
| if (browser_action_command) {
|
| - AddKeybindingPref(browser_action_command->accelerator(),
|
| - extension->id(),
|
| - browser_action_command->command_name(),
|
| - false); // Overwriting not allowed.
|
| + if (!ExtensionKeybindingRegistry::IsChromeAccelerator(
|
| + browser_action_command->accelerator())) {
|
| + AddKeybindingPref(browser_action_command->accelerator(),
|
| + extension->id(),
|
| + browser_action_command->command_name(),
|
| + false); // Overwriting not allowed.
|
| + }
|
| }
|
|
|
| const extensions::Command* page_action_command =
|
| CommandsInfo::GetPageActionCommand(extension);
|
| if (page_action_command) {
|
| - AddKeybindingPref(page_action_command->accelerator(),
|
| - extension->id(),
|
| - page_action_command->command_name(),
|
| - false); // Overwriting not allowed.
|
| + if (!ExtensionKeybindingRegistry::IsChromeAccelerator(
|
| + page_action_command->accelerator())) {
|
| + AddKeybindingPref(page_action_command->accelerator(),
|
| + extension->id(),
|
| + page_action_command->command_name(),
|
| + false); // Overwriting not allowed.
|
| + }
|
| }
|
|
|
| const extensions::Command* script_badge_command =
|
| CommandsInfo::GetScriptBadgeCommand(extension);
|
| if (script_badge_command) {
|
| - AddKeybindingPref(script_badge_command->accelerator(),
|
| - extension->id(),
|
| - script_badge_command->command_name(),
|
| - false); // Overwriting not allowed.
|
| + if (!ExtensionKeybindingRegistry::IsChromeAccelerator(
|
| + script_badge_command->accelerator())) {
|
| + AddKeybindingPref(script_badge_command->accelerator(),
|
| + extension->id(),
|
| + script_badge_command->command_name(),
|
| + false); // Overwriting not allowed.
|
| + }
|
| }
|
| }
|
|
|
|
|