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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

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
Index: chrome/browser/ui/cocoa/browser_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index 5fde5b9a7d258c6e36bcefcf89a1672ab5098f54..dbc7b22d98572492352553f117703162875549e1 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -627,12 +627,8 @@ using content::WebContents;
if ([self isInAnyFullscreenMode])
[floatingBarBackingView_ setNeedsDisplay:YES]; // Okay even if nil.
- auto registry =
- extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile());
- if (registry) {
- registry->set_registry_for_active_window(
- extension_keybinding_registry_.get());
- }
+ extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile())
+ ->set_registry_for_active_window(extension_keybinding_registry_.get());
}
- (void)windowDidResignMain:(NSNotification*)notification {
@@ -644,10 +640,8 @@ using content::WebContents;
if ([self isInAnyFullscreenMode])
[floatingBarBackingView_ setNeedsDisplay:YES]; // Okay even if nil.
- auto registry =
- extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile());
- if (registry)
- registry->set_registry_for_active_window(nullptr);
+ extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile())
+ ->set_registry_for_active_window(nullptr);
}
// Called when we are activated (when we gain focus).
« no previous file with comments | « chrome/browser/extensions/extension_commands_global_registry.h ('k') | chrome/browser/ui/views/toolbar/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698