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

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

Issue 10861002: Revert 152213 - Replace the DownloadFileManager with direct ownership of DownloadFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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.
34 BaseFile(const FilePath& full_path, 32 BaseFile(const FilePath& full_path,
35 const GURL& source_url, 33 const GURL& source_url,
36 const GURL& referrer_url, 34 const GURL& referrer_url,
37 int64 received_bytes, 35 int64 received_bytes,
38 bool calculate_hash, 36 bool calculate_hash,
39 const std::string& hash_state, 37 const std::string& hash_state,
40 const linked_ptr<net::FileStream>& file_stream, 38 const linked_ptr<net::FileStream>& file_stream,
41 const net::BoundNetLog& bound_net_log); 39 const net::BoundNetLog& bound_net_log);
42 virtual ~BaseFile(); 40 virtual ~BaseFile();
43 41
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // Indicates that this class no longer owns the associated file, and so 135 // Indicates that this class no longer owns the associated file, and so
138 // won't delete it on destruction. 136 // won't delete it on destruction.
139 bool detached_; 137 bool detached_;
140 138
141 net::BoundNetLog bound_net_log_; 139 net::BoundNetLog bound_net_log_;
142 140
143 DISALLOW_COPY_AND_ASSIGN(BaseFile); 141 DISALLOW_COPY_AND_ASSIGN(BaseFile);
144 }; 142 };
145 143
146 #endif // CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ 144 #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