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

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

Issue 1751603002: [Downloads] Rework how hashes are calculated for download files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on top of https://codereview.chromium.org/1781983002 since that's going in first. Created 4 years, 9 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
« no previous file with comments | « content/browser/download/mock_download_file.h ('k') | content/browser/download/save_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_SAVE_FILE_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_H_
6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 20 matching lines...) Expand all
31 DownloadInterruptReason Initialize(); 31 DownloadInterruptReason Initialize();
32 DownloadInterruptReason AppendDataToFile(const char* data, size_t data_len); 32 DownloadInterruptReason AppendDataToFile(const char* data, size_t data_len);
33 DownloadInterruptReason Rename(const base::FilePath& full_path); 33 DownloadInterruptReason Rename(const base::FilePath& full_path);
34 void Detach(); 34 void Detach();
35 void Cancel(); 35 void Cancel();
36 void Finish(); 36 void Finish();
37 void AnnotateWithSourceInformation(); 37 void AnnotateWithSourceInformation();
38 base::FilePath FullPath() const; 38 base::FilePath FullPath() const;
39 bool InProgress() const; 39 bool InProgress() const;
40 int64_t BytesSoFar() const; 40 int64_t BytesSoFar() const;
41 bool GetHash(std::string* hash);
42 std::string DebugString() const; 41 std::string DebugString() const;
43 42
44 // Accessors. 43 // Accessors.
45 SaveItemId save_item_id() const { return info_->save_item_id; } 44 SaveItemId save_item_id() const { return info_->save_item_id; }
46 int render_process_id() const { return info_->render_process_id; } 45 int render_process_id() const { return info_->render_process_id; }
47 int request_id() const { return info_->request_id; } 46 int request_id() const { return info_->request_id; }
48 SaveFileCreateInfo::SaveFileSource save_source() const { 47 SaveFileCreateInfo::SaveFileSource save_source() const {
49 return info_->save_source; 48 return info_->save_source;
50 } 49 }
51 50
52 private: 51 private:
53 BaseFile file_; 52 BaseFile file_;
54 scoped_ptr<const SaveFileCreateInfo> info_; 53 scoped_ptr<const SaveFileCreateInfo> info_;
55 54
56 DISALLOW_COPY_AND_ASSIGN(SaveFile); 55 DISALLOW_COPY_AND_ASSIGN(SaveFile);
57 }; 56 };
58 57
59 } // namespace content 58 } // namespace content
60 59
61 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_H_ 60 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_H_
OLDNEW
« no previous file with comments | « content/browser/download/mock_download_file.h ('k') | content/browser/download/save_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698