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

Unified Diff: chrome/browser/ui/ash/launcher/launcher_context_menu.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
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_app_tab_helper.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/launcher_context_menu.cc
diff --git a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
index 7de217430d0d0c8ca90290de163113ac0470f606..2971b5dc079150c85193b781394a8efc561a5af7 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
@@ -13,15 +13,14 @@
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "base/bind.h"
-#include "base/command_line.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/extensions/context_menu_matcher.h"
+#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/fullscreen.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/ash/chrome_shell_delegate.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
-#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/grit/generated_resources.h"
#include "content/public/common/context_menu_params.h"
@@ -106,8 +105,7 @@ void LauncherContextMenu::Init() {
if (!controller_->IsPlatformApp(item_.id) &&
item_.type != ash::TYPE_WINDOWED_APP) {
AddSeparator(ui::NORMAL_SEPARATOR);
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableStreamlinedHostedApps)) {
+ if (extensions::util::IsStreamlinedHostedAppsEnabled()) {
// Streamlined hosted apps launch in a window by default. This menu
// item is re-interpreted as a single, toggle-able option to launch
// the hosted app as a tab.
@@ -313,8 +311,7 @@ void LauncherContextMenu::ExecuteCommand(int command_id, int event_flags) {
extensions::LAUNCH_TYPE_REGULAR;
// Streamlined hosted apps can only toggle between LAUNCH_WINDOW and
// LAUNCH_REGULAR.
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableStreamlinedHostedApps)) {
+ if (extensions::util::IsStreamlinedHostedAppsEnabled()) {
launch_type = controller_->GetLaunchType(item_.id) ==
extensions::LAUNCH_TYPE_REGULAR
? extensions::LAUNCH_TYPE_WINDOW
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_app_tab_helper.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698