Index: chrome/browser/ui/views/create_application_shortcut_view.cc |
diff --git a/chrome/browser/ui/views/create_application_shortcut_view.cc b/chrome/browser/ui/views/create_application_shortcut_view.cc |
index 1a6b51e5c1a89c2e88126b7c1e6df4f5ac1ead26..30f64f0b90da082d38131378c4460bcf2bb233c6 100644 |
--- a/chrome/browser/ui/views/create_application_shortcut_view.cc |
+++ b/chrome/browser/ui/views/create_application_shortcut_view.cc |
@@ -371,9 +371,15 @@ bool CreateApplicationShortcutView::Accept() { |
ShellIntegration::ShortcutLocations creation_locations; |
creation_locations.on_desktop = desktop_check_box_->checked(); |
- creation_locations.in_applications_menu = menu_check_box_ == NULL ? false : |
- menu_check_box_->checked(); |
- creation_locations.applications_menu_subdir = shortcut_menu_subdir_; |
+ if (menu_check_box_ != NULL && menu_check_box_->checked()) { |
+ if (create_in_chrome_apps_subdir_) { |
gab
2013/10/17 15:13:31
Use the ternary operator here as well (as suggeste
calamity
2013/11/20 05:43:30
Done.
|
+ creation_locations.applications_menu_location = |
+ ShellIntegration::APP_MENU_LOCATION_SUBDIR_CHROMEAPPS; |
+ } else { |
+ creation_locations.applications_menu_location = |
+ ShellIntegration::APP_MENU_LOCATION_ROOT; |
+ } |
+ } |
#if defined(OS_WIN) |
creation_locations.in_quick_launch_bar = quick_launch_check_box_ == NULL ? |
@@ -430,8 +436,8 @@ CreateUrlApplicationShortcutView::CreateUrlApplicationShortcutView( |
FetchIcon(); |
} |
- // NOTE: Leave shortcut_menu_subdir_ blank to create URL app shortcuts in the |
- // top-level menu. |
+ // Create URL app shortcuts in the top-level menu. |
+ create_in_chrome_apps_subdir_ = false; |
InitControls(); |
} |
@@ -522,7 +528,7 @@ CreateChromeApplicationShortcutView::CreateChromeApplicationShortcutView( |
shortcut_info_.description = UTF8ToUTF16(app->description()); |
// Place Chrome app shortcuts in the "Chrome Apps" submenu. |
- shortcut_menu_subdir_ = web_app::GetAppShortcutsSubdirName(); |
+ create_in_chrome_apps_subdir_ = true; |
InitControls(); |