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

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

Issue 498573003: Add relaunch into ASH and desktop support for Chrome on Windows 7. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed newline from chrome_command_ids.h 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/apps/apps_metro_handler_win.h ('k') | chrome/browser/ui/ash/ash_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/apps/apps_metro_handler_win.cc
diff --git a/chrome/browser/ui/apps/apps_metro_handler_win.cc b/chrome/browser/ui/apps/apps_metro_handler_win.cc
index ff46fa2b633fa7aa1aa95ce60666528fbd880b70..8d212e8c163ed47285a9144c4092d6eb02b776b1 100644
--- a/chrome/browser/ui/apps/apps_metro_handler_win.cc
+++ b/chrome/browser/ui/apps/apps_metro_handler_win.cc
@@ -12,18 +12,28 @@
#include "chrome/grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
-bool VerifyMetroSwitchForApps(gfx::NativeWindow parent_window,
- int win8_restart_command_id) {
- DCHECK(win8_restart_command_id == IDC_WIN8_DESKTOP_RESTART ||
- win8_restart_command_id == IDC_WIN8_METRO_RESTART);
+bool VerifyASHSwitchForApps(gfx::NativeWindow parent_window,
+ int win_restart_command_id) {
+ DCHECK(win_restart_command_id == IDC_WIN_DESKTOP_RESTART ||
+ win_restart_command_id == IDC_WIN8_METRO_RESTART ||
+ win_restart_command_id == IDC_WIN_CHROMEOS_RESTART);
if (!apps::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(
apps::AppWindow::WINDOW_TYPE_DEFAULT)) {
return true;
}
- int string_id = win8_restart_command_id == IDC_WIN8_METRO_RESTART ?
- IDS_WIN8_PROMPT_TO_CLOSE_APPS_FOR_METRO :
- IDS_WIN8_PROMPT_TO_CLOSE_APPS_FOR_DESKTOP;
+ int string_id = 0;
+ switch (win_restart_command_id) {
+ case IDC_WIN8_METRO_RESTART:
+ string_id = IDS_WIN8_PROMPT_TO_CLOSE_APPS_FOR_METRO;
+ break;
+ case IDC_WIN_CHROMEOS_RESTART:
+ string_id = IDS_WIN_PROMPT_TO_CLOSE_APPS_FOR_CHROMEOS;
+ break;
+ default:
+ string_id = IDS_WIN_PROMPT_TO_CLOSE_APPS_FOR_DESKTOP;
+ break;
+ }
chrome::MessageBoxResult result = chrome::ShowMessageBox(
parent_window,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
« no previous file with comments | « chrome/browser/ui/apps/apps_metro_handler_win.h ('k') | chrome/browser/ui/ash/ash_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698