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

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

Issue 489313002: Centralize command line checks for kEnableStreamlinedHostedApps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 4 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/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index a92e32f8c2a2de847c8896fa5ae206ff2dff6a6c..52025747e48133ad6f862b8126299f4509fd4a10 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -54,6 +54,7 @@
#include "chrome/browser/extensions/api/tabs/tabs_windows_api.h"
#include "chrome/browser/extensions/browser_extension_window_controller.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/favicon/favicon_tab_helper.h"
#include "chrome/browser/file_select_helper.h"
@@ -577,10 +578,8 @@ base::string16 Browser::GetWindowTitleForCurrentTab() const {
// 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)) {
+ if (is_app() && extensions::util::IsStreamlinedHostedAppsEnabled())
return base::UTF8ToUTF16(contents->GetURL().host());
- }
title = contents->GetTitle();
FormatTitleForDisplay(&title);
@@ -2305,10 +2304,9 @@ bool Browser::ShouldShowLocationBar() const {
return true;
if (is_app()) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableStreamlinedHostedApps) &&
+ if (extensions::util::IsStreamlinedHostedAppsEnabled() &&
host_desktop_type() != chrome::HOST_DESKTOP_TYPE_ASH) {
- // If kEnableStreamlinedHostedApps is true, show the location bar for
+ // If streamlined hosted apps are enabled, show the location bar for
// bookmark apps, except on ash which has the toolbar merged into the
// frame.
ExtensionService* service =
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu.cc ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698