Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index 63c0e8c8fe2c1c5fe51228ad5318f7b250ad5e9d..16efd7e3a1c6bca69e6fcf2bf75cd3c4955e4ba2 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -106,6 +106,7 @@ |
#include "chrome/browser/ui/browser_tabstrip.h" |
#include "chrome/browser/ui/browser_toolbar_model_delegate.h" |
#include "chrome/browser/ui/browser_ui_prefs.h" |
+#include "chrome/browser/ui/browser_util.h" |
#include "chrome/browser/ui/browser_window.h" |
#include "chrome/browser/ui/chrome_pages.h" |
#include "chrome/browser/ui/chrome_select_file_policy.h" |
@@ -577,7 +578,7 @@ base::string16 Browser::GetWindowTitleForCurrentTab() const { |
return base::UTF8ToUTF16(contents->GetURL().host()); |
title = contents->GetTitle(); |
- FormatTitleForDisplay(&title); |
+ BrowserUtil::FormatTitleForDisplay(&title); |
} |
if (title.empty()) |
title = CoreTabHelper::GetDefaultTitle(); |
@@ -599,17 +600,6 @@ base::string16 Browser::GetWindowTitleForCurrentTab() const { |
l10n_util::GetStringFUTF16(IDS_BROWSER_WINDOW_TITLE_FORMAT, title); |
} |
-// static |
-void Browser::FormatTitleForDisplay(base::string16* title) { |
- size_t current_index = 0; |
- size_t match_index; |
- while ((match_index = title->find(L'\n', current_index)) != |
- base::string16::npos) { |
- title->replace(match_index, 1, base::string16()); |
- current_index = match_index; |
- } |
-} |
- |
/////////////////////////////////////////////////////////////////////////////// |
// Browser, OnBeforeUnload handling: |
@@ -1127,7 +1117,9 @@ void Browser::TabStripEmpty() { |
} |
bool Browser::CanOverscrollContent() const { |
-#if defined(USE_AURA) |
+ if (!BrowserUtil::IsOverscrollEnabledOnPlatform()) |
+ return false; |
+ |
const std::string value = CommandLine::ForCurrentProcess()-> |
GetSwitchValueASCII(switches::kOverscrollHistoryNavigation); |
bool overscroll_enabled = value != "0"; |
@@ -1143,9 +1135,6 @@ bool Browser::CanOverscrollContent() const { |
if (value == "1" && bookmark_bar_state_ == BookmarkBar::DETACHED) |
return false; |
return true; |
-#else |
- return false; |
-#endif |
} |
bool Browser::ShouldPreserveAbortedURLs(WebContents* source) { |