diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 06:43:17 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 06:43:17 +0000 |
commit | 1c0921376932ac72984ceb1d552d95520d440f46 (patch) | |
tree | a05d9d8bb2122a44bf72086e9121ac280966f077 /chrome/browser/plugin_process_host.cc | |
parent | 43b32af5e7637e43d27948cf8772498d6a4d67b5 (diff) | |
download | chromium_src-1c0921376932ac72984ceb1d552d95520d440f46.zip chromium_src-1c0921376932ac72984ceb1d552d95520d440f46.tar.gz chromium_src-1c0921376932ac72984ceb1d552d95520d440f46.tar.bz2 |
Fix a crash when installing plugins.
* Make sure the scoped_ptr is initialized before trying to open a file.
* Assign the result of FilePath::Append to download_file_path_.
R=ananta
BUG=8087
Review URL: http://codereview.chromium.org/28349
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_process_host.cc')
-rw-r--r-- | chrome/browser/plugin_process_host.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index 15d2317..3ce2a74 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -117,6 +117,7 @@ PluginDownloadUrlHelper::PluginDownloadUrlHelper( // TODO(port): Some window verification for mac and linux. #endif memset(download_file_buffer_->data(), 0, kDownloadFileBufferSize); + download_file_.reset(new net::FileStream()); } PluginDownloadUrlHelper::~PluginDownloadUrlHelper() { @@ -157,9 +158,11 @@ void PluginDownloadUrlHelper::OnResponseStarted(URLRequest* request) { GURL request_url = request->url(); #if defined(OS_WIN) - download_file_path_.Append(UTF8ToWide(request_url.ExtractFileName())); + download_file_path_ = download_file_path_.Append( + UTF8ToWide(request_url.ExtractFileName())); #else - download_file_path_.Append(request_url.ExtractFileName()); + download_file_path_ = download_file_path_.Append( + request_url.ExtractFileName()); #endif download_file_->Open(download_file_path_, |