From c873c86e729705b965d750a3b1f10b24609596f1 Mon Sep 17 00:00:00 2001 From: "rdsmith@chromium.org" Date: Wed, 17 Oct 2012 15:32:12 +0000 Subject: Shift passage of FileStream in downloads system to be by scoped_ptr<>. http://codereview.chromium.org/10912173/ constructs the DownloadFile, and thus the BaseFile, on the UI thread and then passes it to the FILE thread. DownloadFile / BaseFile may be constructed with a FileStream to which to write the download. The FileStream cannot be passed by linked_ptr<> in this case, as that is not thread safe. BUG=123998 R=benjhayden@chromium.org Review URL: https://chromiumcodereview.appspot.com/11028131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162411 0039d316-1c4b-4281-b951-d872f2087c98 --- content/browser/download/base_file.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'content/browser/download/base_file.cc') diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc index cc7871f..cad472f 100644 --- a/content/browser/download/base_file.cc +++ b/content/browser/download/base_file.cc @@ -209,12 +209,12 @@ BaseFile::BaseFile(const FilePath& full_path, int64 received_bytes, bool calculate_hash, const std::string& hash_state, - const linked_ptr& file_stream, + scoped_ptr file_stream, const net::BoundNetLog& bound_net_log) : full_path_(full_path), source_url_(source_url), referrer_url_(referrer_url), - file_stream_(file_stream), + file_stream_(file_stream.Pass()), bytes_so_far_(received_bytes), start_tick_(base::TimeTicks::Now()), calculate_hash_(calculate_hash), -- cgit v1.1