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

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

Issue 10799005: Replace the DownloadFileManager with direct ownership (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to LKGR. Created 8 years, 4 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
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/download/base_file.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BASE_FILE_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_
6 #define CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 11 matching lines...) Expand all
22 class SecureHash; 22 class SecureHash;
23 } 23 }
24 namespace net { 24 namespace net {
25 class FileStream; 25 class FileStream;
26 } 26 }
27 27
28 // File being downloaded and saved to disk. This is a base class 28 // File being downloaded and saved to disk. This is a base class
29 // for DownloadFile and SaveFile, which keep more state information. 29 // for DownloadFile and SaveFile, which keep more state information.
30 class CONTENT_EXPORT BaseFile { 30 class CONTENT_EXPORT BaseFile {
31 public: 31 public:
32 // May be constructed on any thread. All other routines (including
33 // destruction) must occur on the FILE thread.
32 BaseFile(const FilePath& full_path, 34 BaseFile(const FilePath& full_path,
33 const GURL& source_url, 35 const GURL& source_url,
34 const GURL& referrer_url, 36 const GURL& referrer_url,
35 int64 received_bytes, 37 int64 received_bytes,
36 bool calculate_hash, 38 bool calculate_hash,
37 const std::string& hash_state, 39 const std::string& hash_state,
38 const linked_ptr<net::FileStream>& file_stream, 40 const linked_ptr<net::FileStream>& file_stream,
39 const net::BoundNetLog& bound_net_log); 41 const net::BoundNetLog& bound_net_log);
40 virtual ~BaseFile(); 42 virtual ~BaseFile();
41 43
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // Indicates that this class no longer owns the associated file, and so 137 // Indicates that this class no longer owns the associated file, and so
136 // won't delete it on destruction. 138 // won't delete it on destruction.
137 bool detached_; 139 bool detached_;
138 140
139 net::BoundNetLog bound_net_log_; 141 net::BoundNetLog bound_net_log_;
140 142
141 DISALLOW_COPY_AND_ASSIGN(BaseFile); 143 DISALLOW_COPY_AND_ASSIGN(BaseFile);
142 }; 144 };
143 145
144 #endif // CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ 146 #endif // CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/download/base_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698