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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_view.cc

Issue 883553002: A better fix for crash when opening Incognito window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ValidationMessageBubble
Patch Set: Created 5 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
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698