| Index: chrome/browser/ui/views/toolbar/toolbar_view.cc
|
| diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc
|
| index b847ae803998743251a4eba892e095730553dcd8..f592080459934fe708820e569b86c49875663fd0 100644
|
| --- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
|
| +++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
|
| @@ -284,14 +284,12 @@ void ToolbarView::OnWidgetActivationChanged(views::Widget* widget,
|
| bool active) {
|
| extensions::ExtensionCommandsGlobalRegistry* registry =
|
| extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile());
|
| - if (registry) {
|
| - if (active) {
|
| - registry->set_registry_for_active_window(
|
| - browser_actions_->extension_keybinding_registry());
|
| - } else if (registry->registry_for_active_window() ==
|
| - browser_actions_->extension_keybinding_registry()) {
|
| - registry->set_registry_for_active_window(NULL);
|
| - }
|
| + if (active) {
|
| + registry->set_registry_for_active_window(
|
| + browser_actions_->extension_keybinding_registry());
|
| + } else if (registry->registry_for_active_window() ==
|
| + browser_actions_->extension_keybinding_registry()) {
|
| + registry->set_registry_for_active_window(nullptr);
|
| }
|
| }
|
|
|
|
|