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

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

Issue 105733003: Move LaunchType out of ExtensionPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indenting Created 7 years 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/extensions/launch_util.cc ('k') | chrome/browser/ui/app_list/app_list_controller_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/app_context_menu.cc
diff --git a/chrome/browser/ui/app_list/app_context_menu.cc b/chrome/browser/ui/app_list/app_context_menu.cc
index 2d131e98720e4fa025c387143b6f2414eb5b9baa..27345bd471ac8ddb5d83be4f635928a9bf44b8f0 100644
--- a/chrome/browser/ui/app_list/app_context_menu.cc
+++ b/chrome/browser/ui/app_list/app_context_menu.cc
@@ -8,6 +8,7 @@
#include "base/command_line.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/extensions/context_menu_matcher.h"
+#include "chrome/browser/extensions/launch_util.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/app_context_menu_delegate.h"
@@ -240,21 +241,18 @@ void AppContextMenu::ExecuteCommand(int command_id, int event_flags) {
controller_->DoCreateShortcutsFlow(profile_, app_id_);
} else if (command_id >= LAUNCH_TYPE_START &&
command_id < LAUNCH_TYPE_LAST) {
- extensions::ExtensionPrefs::LaunchType launch_type =
- static_cast<extensions::ExtensionPrefs::LaunchType>(
- command_id - LAUNCH_TYPE_START);
+ extensions::LaunchType launch_type =
+ static_cast<extensions::LaunchType>(command_id - LAUNCH_TYPE_START);
// Streamlined hosted apps can only toggle between LAUNCH_WINDOW and
// LAUNCH_REGULAR.
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableStreamlinedHostedApps)) {
- launch_type = controller_->GetExtensionLaunchType(profile_, app_id_) ==
- extensions::ExtensionPrefs::LAUNCH_TYPE_REGULAR
- ? extensions::ExtensionPrefs::LAUNCH_TYPE_WINDOW
- : extensions::ExtensionPrefs::LAUNCH_TYPE_REGULAR;
+ launch_type = (controller_->GetExtensionLaunchType(profile_, app_id_) ==
+ extensions::LAUNCH_TYPE_REGULAR) ?
+ extensions::LAUNCH_TYPE_WINDOW :
+ extensions::LAUNCH_TYPE_REGULAR;
}
- controller_->SetExtensionLaunchType(profile_,
- app_id_,
- launch_type);
+ controller_->SetExtensionLaunchType(profile_, app_id_, launch_type);
} else if (command_id == OPTIONS) {
controller_->ShowOptionsPage(profile_, app_id_);
} else if (command_id == UNINSTALL) {
« no previous file with comments | « chrome/browser/extensions/launch_util.cc ('k') | chrome/browser/ui/app_list/app_list_controller_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698