Commit f53ec988 authored by benwells@chromium.org's avatar benwells@chromium.org

Use the host instead of the title for streamlined hosted apps.

As there is no URL being displayed users need to be aware of what host
they are on for security reasons. This is part of the experimental
streamlined hosted apps window frame.

BUG=368372

Review URL: https://codereview.chromium.org/490103003

Cr-Commit-Position: refs/heads/master@{#291305}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291305 0039d316-1c4b-4281-b951-d872f2087c98
parent e7c48029
......@@ -576,6 +576,12 @@ base::string16 Browser::GetWindowTitleForCurrentTab() const {
// |contents| can be NULL because GetWindowTitleForCurrentTab is called by the
// window during the window's creation (before tabs have been added).
if (contents) {
// Streamlined hosted apps use the host instead of the title.
if (is_app() && CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableStreamlinedHostedApps)) {
return base::UTF8ToUTF16(contents->GetURL().host());
}
title = contents->GetTitle();
FormatTitleForDisplay(&title);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment