OLD | NEW |
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_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 virtual bool InProgress() const = 0; | 66 virtual bool InProgress() const = 0; |
67 virtual int64 CurrentSpeed() const = 0; | 67 virtual int64 CurrentSpeed() const = 0; |
68 | 68 |
69 // Set |hash| with sha256 digest for the file. | 69 // Set |hash| with sha256 digest for the file. |
70 // Returns true if digest is successfully calculated. | 70 // Returns true if digest is successfully calculated. |
71 virtual bool GetHash(std::string* hash) = 0; | 71 virtual bool GetHash(std::string* hash) = 0; |
72 | 72 |
73 // Returns the current (intermediate) state of the hash as a byte string. | 73 // Returns the current (intermediate) state of the hash as a byte string. |
74 virtual std::string GetHashState() = 0; | 74 virtual std::string GetHashState() = 0; |
75 | 75 |
| 76 // Set the application GUID to be used to identify the app to the |
| 77 // system AV function when scanning downloaded files. Should be called |
| 78 // before RenameAndAnnotate() to take effect. |
| 79 virtual void SetClientGuid(const std::string& guid) = 0; |
| 80 |
76 // For testing. Must be called on FILE thread. | 81 // For testing. Must be called on FILE thread. |
77 // TODO(rdsmith): Replace use of EnsureNoPendingDownloads() | 82 // TODO(rdsmith): Replace use of EnsureNoPendingDownloads() |
78 // on the DownloadManager with a test-specific DownloadFileFactory | 83 // on the DownloadManager with a test-specific DownloadFileFactory |
79 // which keeps track of the number of DownloadFiles. | 84 // which keeps track of the number of DownloadFiles. |
80 static int GetNumberOfDownloadFiles(); | 85 static int GetNumberOfDownloadFiles(); |
81 | 86 |
82 protected: | 87 protected: |
83 static int number_active_objects_; | 88 static int number_active_objects_; |
84 }; | 89 }; |
85 | 90 |
86 } // namespace content | 91 } // namespace content |
87 | 92 |
88 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ | 93 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ |
OLD | NEW |