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

Unified Diff: chrome/browser/ui/views/ash/chrome_shell_delegate.cc

Issue 10315013: ash: Fix a couple issues in ChromeShellDelegate::Search (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/ash/chrome_shell_delegate.cc
diff --git a/chrome/browser/ui/views/ash/chrome_shell_delegate.cc b/chrome/browser/ui/views/ash/chrome_shell_delegate.cc
index 368d7981a135db1b5955f0d4b5efdc1996df9cc1..bc5c703aaca6c76421fdba8e8c0a6e50bddd0303 100644
--- a/chrome/browser/ui/views/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/views/ash/chrome_shell_delegate.cc
@@ -134,7 +134,8 @@ void ChromeShellDelegate::Search() {
Browser* target_browser = Browser::GetOrCreateTabbedBrowser(
last_active ? last_active->profile() :
ProfileManager::GetDefaultProfileOrOffTheRecord());
- const GURL& url = target_browser->GetSelectedWebContents()->GetURL();
+ const GURL& url = target_browser->GetSelectedWebContents() ?
+ target_browser->GetSelectedWebContents()->GetURL() : GURL();
if (url.SchemeIs(chrome::kChromeUIScheme) &&
url.host() == chrome::kChromeUINewTabHost) {
// If the NTP is showing, focus the omnibox.
@@ -142,6 +143,7 @@ void ChromeShellDelegate::Search() {
} else {
target_browser->NewTab();
}
+ target_browser->window()->Show();
}
void ChromeShellDelegate::OpenFileManager() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698