Commit 5fe4a49b authored by maruel@chromium.org's avatar maruel@chromium.org

Revert r124644, which reverted r124636 instead of r124635 as stated.

In addition, the revert r124644 was irrelevant, it didn't cause any failure of
any kind.

Sorry for the confusion.

TBR=benwells@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9572013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124645 0039d316-1c4b-4281-b951-d872f2087c98
parent 38f97800
......@@ -127,6 +127,7 @@
#endif
#if defined(OS_WIN)
#include "base/win/windows_version.h"
#include "chrome/installer/util/auto_launch_util.h"
#endif
......@@ -492,7 +493,7 @@ enum LaunchMode {
LM_SHORTCUT_UNKNOWN, // Launched from user-defined shortcut.
LM_SHORTCUT_QUICKLAUNCH, // Launched from the quick launch bar.
LM_SHORTCUT_DESKTOP, // Launched from a desktop shortcut.
LM_SHORTCUT_STARTMENU, // Launched from start menu.
LM_SHORTCUT_TASKBAR, // Launched from the taskbar.
LM_LINUX_MAC_BEOS // Other OS buckets start here.
};
......@@ -506,10 +507,14 @@ LaunchMode GetLaunchShortcutKind() {
if (si.dwFlags & 0x800) {
if (!si.lpTitle)
return LM_SHORTCUT_NONAME;
std::wstring shortcut(si.lpTitle);
string16 shortcut(si.lpTitle);
// The windows quick launch path is not localized.
if (shortcut.find(L"\\Quick Launch\\") != std::wstring::npos)
return LM_SHORTCUT_QUICKLAUNCH;
if (shortcut.find(L"\\Quick Launch\\") != string16::npos) {
if (base::win::GetVersion() >= base::win::VERSION_WIN7)
return LM_SHORTCUT_TASKBAR;
else
return LM_SHORTCUT_QUICKLAUNCH;
}
scoped_ptr<base::Environment> env(base::Environment::Create());
std::string appdata_path;
env->GetVar("USERPROFILE", &appdata_path);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment