diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-26 22:47:11 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-26 22:47:11 +0000 |
commit | 828cabe21191c14e43fc3dda06918f7ec8c91988 (patch) | |
tree | 5d6872acf00deee9aa71392a427d60e25e09cbeb /chrome/browser/tab_contents | |
parent | 178102d66e9dc222613e36bfac6933d3e5de59a9 (diff) | |
download | chromium_src-828cabe21191c14e43fc3dda06918f7ec8c91988.zip chromium_src-828cabe21191c14e43fc3dda06918f7ec8c91988.tar.gz chromium_src-828cabe21191c14e43fc3dda06918f7ec8c91988.tar.bz2 |
Update the TabContents::SavePage parameter to take FilePath instead of wstring to avoid conversions "To and From wstring".
BUG=None
TEST=run unit_tests.exe
Review URL: http://codereview.chromium.org/217008
Patch from tfarina.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27331 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 7 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.h | 3 |
2 files changed, 3 insertions, 7 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index 24fd51a..d36d53f 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -1127,15 +1127,12 @@ void TabContents::OnSavePage() { // Used in automated testing to bypass prompting the user for file names. // Instead, the names and paths are hard coded rather than running them through // file name sanitation and extension / mime checking. -bool TabContents::SavePage(const std::wstring& main_file, - const std::wstring& dir_path, +bool TabContents::SavePage(const FilePath& main_file, const FilePath& dir_path, SavePackage::SavePackageType save_type) { // Stop the page from navigating. Stop(); - save_package_ = new SavePackage(this, save_type, - FilePath::FromWStringHack(main_file), - FilePath::FromWStringHack(dir_path)); + save_package_ = new SavePackage(this, save_type, main_file, dir_path); return save_package_->Init(); } diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h index 5749e60..74669b3 100644 --- a/chrome/browser/tab_contents/tab_contents.h +++ b/chrome/browser/tab_contents/tab_contents.h @@ -558,8 +558,7 @@ class TabContents : public PageNavigator, // Save page with the main HTML file path, the directory for saving resources, // and the save type: HTML only or complete web page. Returns true if the // saving process has been initiated successfully. - bool SavePage(const std::wstring& main_file, - const std::wstring& dir_path, + bool SavePage(const FilePath& main_file, const FilePath& dir_path, SavePackage::SavePackageType save_type); // Displays asynchronously a print preview (generated by the renderer) if not |