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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_view.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/views/toolbar/toolbar_view.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc
index 1c437ae39026d793d8f04c99eff6dbc9f9c60fd7..92791c5cab86add4e901222e52f3a77de4b37625 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/command_updater.h"
#include "chrome/browser/extensions/extension_action.h"
#include "chrome/browser/extensions/extension_action_manager.h"
+#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/ui/browser.h"
@@ -103,11 +104,6 @@ const int kContentShadowHeightAsh = 2;
// Non-ash uses a rounded content area with no shadow in the assets.
const int kContentShadowHeight = 0;
-bool IsStreamlinedHostedAppsEnabled() {
- return CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableStreamlinedHostedApps);
-}
-
#if !defined(OS_CHROMEOS)
bool HasAshShell() {
#if defined(USE_ASH)
@@ -152,7 +148,7 @@ ToolbarView::ToolbarView(Browser* browser)
display_mode_ = DISPLAYMODE_LOCATION;
if (browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP) ||
- (browser->is_app() && IsStreamlinedHostedAppsEnabled()))
+ (browser->is_app() && extensions::util::IsStreamlinedHostedAppsEnabled()))
display_mode_ = DISPLAYMODE_NORMAL;
if (OutdatedUpgradeBubbleView::IsAvailable()) {
@@ -575,7 +571,8 @@ void ToolbarView::Layout() {
next_element_x = reload_->bounds().right();
if (show_home_button_.GetValue() ||
- (browser_->is_app() && IsStreamlinedHostedAppsEnabled())) {
+ (browser_->is_app() &&
+ extensions::util::IsStreamlinedHostedAppsEnabled())) {
home_->SetVisible(true);
home_->SetBounds(next_element_x, child_y,
home_->GetPreferredSize().width(), child_height);
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | chrome/browser/ui/webui/ntp/ntp_resource_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698