Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: content/browser/download/download_file_impl.h

Issue 11028131: Shift passage of FileStream in downloads system to be by scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated Al's comments. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_
7 7
8 #include "content/browser/download/download_file.h" 8 #include "content/browser/download/download_file.h"
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 11 matching lines...) Expand all
22 namespace content { 22 namespace content {
23 class ByteStreamReader; 23 class ByteStreamReader;
24 class DownloadManager; 24 class DownloadManager;
25 class PowerSaveBlocker; 25 class PowerSaveBlocker;
26 } 26 }
27 27
28 class CONTENT_EXPORT DownloadFileImpl : virtual public content::DownloadFile { 28 class CONTENT_EXPORT DownloadFileImpl : virtual public content::DownloadFile {
29 public: 29 public:
30 // Takes ownership of the object pointed to by |request_handle|. 30 // Takes ownership of the object pointed to by |request_handle|.
31 // |bound_net_log| will be used for logging the download file's events. 31 // |bound_net_log| will be used for logging the download file's events.
32 DownloadFileImpl(const DownloadCreateInfo* info, 32 DownloadFileImpl(scoped_ptr<DownloadCreateInfo> info,
33 scoped_ptr<content::ByteStreamReader> stream, 33 scoped_ptr<content::ByteStreamReader> stream,
34 DownloadRequestHandleInterface* request_handle, 34 scoped_ptr<DownloadRequestHandleInterface> request_handle,
35 scoped_refptr<content::DownloadManager> download_manager, 35 scoped_refptr<content::DownloadManager> download_manager,
36 bool calculate_hash, 36 bool calculate_hash,
37 scoped_ptr<content::PowerSaveBlocker> power_save_blocker, 37 scoped_ptr<content::PowerSaveBlocker> power_save_blocker,
38 const net::BoundNetLog& bound_net_log); 38 const net::BoundNetLog& bound_net_log);
39 virtual ~DownloadFileImpl(); 39 virtual ~DownloadFileImpl();
40 40
41 // DownloadFile functions. 41 // DownloadFile functions.
42 virtual content::DownloadInterruptReason Initialize() OVERRIDE; 42 virtual content::DownloadInterruptReason Initialize() OVERRIDE;
43 virtual void Rename(const FilePath& full_path, 43 virtual void Rename(const FilePath& full_path,
44 bool overwrite_existing_file, 44 bool overwrite_existing_file,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 base::WeakPtrFactory<DownloadFileImpl> weak_factory_; 107 base::WeakPtrFactory<DownloadFileImpl> weak_factory_;
108 108
109 // RAII handle to keep the system from sleeping while we're downloading. 109 // RAII handle to keep the system from sleeping while we're downloading.
110 scoped_ptr<content::PowerSaveBlocker> power_save_blocker_; 110 scoped_ptr<content::PowerSaveBlocker> power_save_blocker_;
111 111
112 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); 112 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl);
113 }; 113 };
114 114
115 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ 115 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_file_factory.cc ('k') | content/browser/download/download_file_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698