summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/save_package.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 22:47:28 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 22:47:28 +0000
commit0952b15f6f25aec2a4b63fe98d42100a30866429 (patch)
treed5af0cc13578532cf7edf3ff0347f796bbbbff74 /chrome/browser/download/save_package.cc
parentfde6714d19b512b6190f08082c2ea05a21050253 (diff)
downloadchromium_src-0952b15f6f25aec2a4b63fe98d42100a30866429.zip
chromium_src-0952b15f6f25aec2a4b63fe98d42100a30866429.tar.gz
chromium_src-0952b15f6f25aec2a4b63fe98d42100a30866429.tar.bz2
Fix save complete .html page.
BUG=7616 Review URL: http://codereview.chromium.org/21482 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9988 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/save_package.cc')
-rw-r--r--chrome/browser/download/save_package.cc15
1 files changed, 4 insertions, 11 deletions
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index 91e0b41..56723c4 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -958,19 +958,12 @@ bool SavePackage::GetSaveInfo(const FilePath& suggest_name,
// Since we take the suggested name from the web page's title, we want to
// ignore the file extension generated by SaveFileAsWithFilter, since it
// will always be ".htm".
- // TODO(estade): is this saved_main_file_path assignment behavior desired?
- // It was copied from previous code but seems strange.
std::wstring main_file_path;
- if (!win_util::SaveFileAsWithFilter(container_hwnd,
- suggest_name.value(),
- filter,
- L"htm",
- true,
- &index,
- &main_file_path)) {
- param->saved_main_file_path = FilePath(main_file_path);
+ bool success = win_util::SaveFileAsWithFilter(container_hwnd,
+ suggest_name.value(), filter, L"htm", true, &index, &main_file_path);
+ param->saved_main_file_path = FilePath(main_file_path);
+ if (!success)
return false;
- }
} else {
param->saved_main_file_path = suggest_name;
}