summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-11 02:19:22 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-11 02:19:22 +0000
commit24ce7d31c745ce4b045f81f74fa2def3d7a18b34 (patch)
tree5462d5350dabfcec873d83a13e84e8f9bbdf1bd8 /chrome/browser/tab_contents
parent9a44a59e3ec2e8090aa9b6000b487c8efc70e96d (diff)
downloadchromium_src-24ce7d31c745ce4b045f81f74fa2def3d7a18b34.zip
chromium_src-24ce7d31c745ce4b045f81f74fa2def3d7a18b34.tar.gz
chromium_src-24ce7d31c745ce4b045f81f74fa2def3d7a18b34.tar.bz2
Port some strings in download/save_package.cc
Review URL: http://codereview.chromium.org/23004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9547 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/web_contents.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/chrome/browser/tab_contents/web_contents.cc b/chrome/browser/tab_contents/web_contents.cc
index 1670493..301344b 100644
--- a/chrome/browser/tab_contents/web_contents.cc
+++ b/chrome/browser/tab_contents/web_contents.cc
@@ -556,8 +556,8 @@ void WebContents::OnSavePage() {
PrefService* prefs = profile()->GetPrefs();
DCHECK(prefs);
- std::wstring suggest_name =
- SavePackage::GetSuggestNameForSaveAs(prefs, GetTitle());
+ FilePath suggest_name = SavePackage::GetSuggestNameForSaveAs(prefs,
+ FilePath::FromWStringHack(GetTitle()));
SavePackage::SavePackageParam param(contents_mime_type());
param.prefs = prefs;
@@ -565,8 +565,11 @@ void WebContents::OnSavePage() {
// TODO(rocking): Use new asynchronous dialog boxes to prevent the SaveAs
// dialog blocking the UI thread. See bug: http://b/issue?id=1129694.
if (SavePackage::GetSaveInfo(suggest_name, view_->GetNativeView(),
- &param, profile()->GetDownloadManager()))
- SavePage(param.saved_main_file_path, param.dir, param.save_type);
+ &param, profile()->GetDownloadManager())) {
+ SavePage(param.saved_main_file_path.ToWStringHack(),
+ param.dir.ToWStringHack(),
+ param.save_type);
+ }
}
void WebContents::SavePage(const std::wstring& main_file,
@@ -575,7 +578,9 @@ void WebContents::SavePage(const std::wstring& main_file,
// Stop the page from navigating.
Stop();
- save_package_ = new SavePackage(this, save_type, main_file, dir_path);
+ save_package_ = new SavePackage(this, save_type,
+ FilePath::FromWStringHack(main_file),
+ FilePath::FromWStringHack(dir_path));
save_package_->Init();
}