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

Unified Diff: win8/delegate_execute/delegate_execute_operation.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 | « win8/delegate_execute/delegate_execute.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win8/delegate_execute/delegate_execute_operation.cc
diff --git a/win8/delegate_execute/delegate_execute_operation.cc b/win8/delegate_execute/delegate_execute_operation.cc
index 91e5effdc64507167bebc6c39932c4ab201722c2..ac364273b8ea557c86388409f28874c00c19e0ba 100644
--- a/win8/delegate_execute/delegate_execute_operation.cc
+++ b/win8/delegate_execute/delegate_execute_operation.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
+#include "base/win/windows_version.h"
#include "chrome/common/chrome_switches.h"
#include "win8/delegate_execute/delegate_execute_util.h"
@@ -20,13 +21,19 @@ DelegateExecuteOperation::~DelegateExecuteOperation() {
}
bool DelegateExecuteOperation::Init(const CommandLine* cmd_line) {
- base::FilePath shortcut(
- cmd_line->GetSwitchValuePath(switches::kRelaunchShortcut));
- if (shortcut.empty()) {
- operation_type_ = DELEGATE_EXECUTE;
- return true;
+ if (base::win::GetVersion() >= base::win::VERSION_WIN7) {
+ base::FilePath shortcut(
+ cmd_line->GetSwitchValuePath(switches::kRelaunchShortcut));
+ // On Windows 7 the command line coming in may not have a path to the
+ // shortcut to launch Chrome. We ignore the shortcut and just do a regular
+ // ShellExecute of chrome.exe in this case.
+ if (shortcut.empty() &&
+ base::win::GetVersion() >= base::win::VERSION_WIN8) {
+ operation_type_ = DELEGATE_EXECUTE;
+ return true;
+ }
+ relaunch_shortcut_ = shortcut;
}
- relaunch_shortcut_ = shortcut;
mutex_ = cmd_line->GetSwitchValueNative(switches::kWaitForMutex);
if (mutex_.empty())
return false;
« no previous file with comments | « win8/delegate_execute/delegate_execute.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698