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

Unified Diff: chrome/browser/ui/omnibox/chrome_omnibox_client.cc

Issue 2738003002: Add title to current page in zero suggest. (Closed)
Patch Set: Remove debugging info. Created 3 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
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..98527199163da7ff4d30ab78fc570c34b40d0890 100644
--- a/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
+#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/autocomplete/autocomplete_classifier_factory.h"
@@ -151,7 +152,8 @@ const GURL& ChromeOmniboxClient::GetURL() const {
}
const base::string16& ChromeOmniboxClient::GetTitle() const {
- return controller_->GetWebContents()->GetTitle();
+ return CurrentPageExists() ? controller_->GetWebContents()->GetTitle()
+ : base::EmptyString16();
}
gfx::Image ChromeOmniboxClient::GetFavicon() const {

Powered by Google App Engine
This is Rietveld 408576698