Index: chrome/browser/ui/omnibox/chrome_omnibox_client.cc |
diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_client.cc b/chrome/browser/ui/omnibox/chrome_omnibox_client.cc |
index c6f224e697e7efc67d101755fdab2e35a536f370..2896ad6104179f93a0d79bb1e4dae3c9c792176a 100644 |
--- a/chrome/browser/ui/omnibox/chrome_omnibox_client.cc |
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_client.cc |
@@ -151,7 +151,9 @@ const GURL& ChromeOmniboxClient::GetURL() const { |
} |
const base::string16& ChromeOmniboxClient::GetTitle() const { |
- return controller_->GetWebContents()->GetTitle(); |
+ static const auto* const kEmptyTitle = new base::string16(); |
Peter Kasting
2017/04/27 00:33:57
Don't do this; return EmptyString16() below instea
gcomanici
2017/04/27 02:11:23
Done.
|
+ return CurrentPageExists() ? controller_->GetWebContents()->GetTitle() |
+ : *kEmptyTitle; |
} |
gfx::Image ChromeOmniboxClient::GetFavicon() const { |