diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-17 19:57:24 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-17 19:57:24 +0000 |
commit | 7cef64b495701e8ff17b2fbb6e632aa34eee450f (patch) | |
tree | 8af439034838b28edd0223010a1f6aad4b2f61ce /chrome/browser/download/save_file_manager.cc | |
parent | a16d22388edff186095e37fecd5537beae88c7c9 (diff) | |
download | chromium_src-7cef64b495701e8ff17b2fbb6e632aa34eee450f.zip chromium_src-7cef64b495701e8ff17b2fbb6e632aa34eee450f.tar.gz chromium_src-7cef64b495701e8ff17b2fbb6e632aa34eee450f.tar.bz2 |
Reverting 7149.
Review URL: http://codereview.chromium.org/15004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7153 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/save_file_manager.cc')
-rw-r--r-- | chrome/browser/download/save_file_manager.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/download/save_file_manager.cc b/chrome/browser/download/save_file_manager.cc index 631b55d..940e878 100644 --- a/chrome/browser/download/save_file_manager.cc +++ b/chrome/browser/download/save_file_manager.cc @@ -215,10 +215,14 @@ void SaveFileManager::RemoveSaveFile(int save_id, const std::wstring& save_url, // only on the UI thread. SavePackage* SaveFileManager::GetSavePackageFromRenderIds( int render_process_id, int render_view_id) { - WebContents* contents = tab_util::GetWebContentsByID(render_process_id, + TabContents* contents = tab_util::GetTabContentsByID(render_process_id, render_view_id); - if (contents) - return contents->save_package(); + if (contents && contents->type() == TAB_CONTENTS_WEB) { + // Convert const pointer of WebContents to pointer of WebContents. + const WebContents* web_contents = contents->AsWebContents(); + if (web_contents) + return web_contents->save_package(); + } return NULL; } |