diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 23:31:41 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 23:31:41 +0000 |
commit | 7ae7c2cbd38f886f4056fa7434a6c1189d98ffd2 (patch) | |
tree | e606471e20eb79fea7a05c9005869065bf865ca1 /chrome/common/win_util.cc | |
parent | cab465ccf2a93d84e0f16987d8754ac2673eb118 (diff) | |
download | chromium_src-7ae7c2cbd38f886f4056fa7434a6c1189d98ffd2.zip chromium_src-7ae7c2cbd38f886f4056fa7434a6c1189d98ffd2.tar.gz chromium_src-7ae7c2cbd38f886f4056fa7434a6c1189d98ffd2.tar.bz2 |
Convert download manager to FilePath.
(Fixed up version of issue 17032. Now passes all unit tests.)
Review URL: http://codereview.chromium.org/16533
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7630 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/win_util.cc')
-rw-r--r-- | chrome/common/win_util.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/common/win_util.cc b/chrome/common/win_util.cc index b14e0c9..1c552a2 100644 --- a/chrome/common/win_util.cc +++ b/chrome/common/win_util.cc @@ -223,33 +223,33 @@ void ShowItemInFolder(const std::wstring& full_path) { // Open an item via a shell execute command. Error code checking and casting // explanation: http://msdn2.microsoft.com/en-us/library/ms647732.aspx -bool OpenItemViaShell(const std::wstring& full_path, bool ask_for_app) { +bool OpenItemViaShell(const FilePath& full_path, bool ask_for_app) { HINSTANCE h = ::ShellExecuteW( - NULL, NULL, full_path.c_str(), NULL, - file_util::GetDirectoryFromPath(full_path).c_str(), SW_SHOWNORMAL); + NULL, NULL, full_path.value().c_str(), NULL, + full_path.DirName().value().c_str(), SW_SHOWNORMAL); LONG_PTR error = reinterpret_cast<LONG_PTR>(h); if (error > 32) return true; if ((error == SE_ERR_NOASSOC) && ask_for_app) - return OpenItemWithExternalApp(full_path); + return OpenItemWithExternalApp(full_path.value()); return false; } -bool OpenItemViaShellNoZoneCheck(const std::wstring& full_path, +bool OpenItemViaShellNoZoneCheck(const FilePath& full_path, bool ask_for_app) { SHELLEXECUTEINFO sei = { sizeof(sei) }; sei.fMask = SEE_MASK_NOZONECHECKS | SEE_MASK_FLAG_DDEWAIT; sei.nShow = SW_SHOWNORMAL; sei.lpVerb = NULL; - sei.lpFile = full_path.c_str(); + sei.lpFile = full_path.value().c_str(); if (::ShellExecuteExW(&sei)) return true; LONG_PTR error = reinterpret_cast<LONG_PTR>(sei.hInstApp); if ((error == SE_ERR_NOASSOC) && ask_for_app) - return OpenItemWithExternalApp(full_path); + return OpenItemWithExternalApp(full_path.value()); return false; } |