diff options
author | rdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-17 15:32:12 +0000 |
---|---|---|
committer | rdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-17 15:32:12 +0000 |
commit | c873c86e729705b965d750a3b1f10b24609596f1 (patch) | |
tree | 0f2fa852ab38f1bd063f40c74929b7bc79b98d2f /content/browser/download/base_file.cc | |
parent | 2009bae5fad948acb7cc1e930057a2da29d5e80c (diff) | |
download | chromium_src-c873c86e729705b965d750a3b1f10b24609596f1.zip chromium_src-c873c86e729705b965d750a3b1f10b24609596f1.tar.gz chromium_src-c873c86e729705b965d750a3b1f10b24609596f1.tar.bz2 |
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
Diffstat (limited to 'content/browser/download/base_file.cc')
-rw-r--r-- | content/browser/download/base_file.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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<net::FileStream>& file_stream, + scoped_ptr<net::FileStream> 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), |