| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_DOWNLOAD_METADATA_MANAGE
R_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_DOWNLOAD_METADATA_MANAGE
R_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_DOWNLOAD_METADATA_MANAGE
R_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_DOWNLOAD_METADATA_MANAGE
R_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "content/public/browser/download_manager.h" | 14 #include "content/public/browser/download_manager.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class SequencedTaskRunner; | 17 class SequencedTaskRunner; |
| 18 class SequencedWorkerPool; | 18 class SequencedWorkerPool; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace content { | 21 namespace content { |
| 22 class BrowserContext; | 22 class BrowserContext; |
| 23 class DownloadItem; | 23 class DownloadItem; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace safe_browsing { | 26 namespace safe_browsing { |
| 27 | 27 |
| 28 class ClientDownloadRequest; | 28 class ClientDownloadRequest; |
| 29 class ClientIncidentReport_DownloadDetails; | 29 class ClientIncidentReport_DownloadDetails; |
| 30 class DownloadMetadata; | |
| 31 | 30 |
| 32 // A browser-wide object that manages the persistent state of metadata | 31 // A browser-wide object that manages the persistent state of metadata |
| 33 // pertaining to a download. | 32 // pertaining to a download. |
| 34 class DownloadMetadataManager : public content::DownloadManager::Observer { | 33 class DownloadMetadataManager : public content::DownloadManager::Observer { |
| 35 public: | 34 public: |
| 36 // A callback run when the results of a call to GetDownloadDetails are ready. | 35 // A callback run when the results of a call to GetDownloadDetails are ready. |
| 37 // The supplied parameter may be null, indicating that there are no persisted | 36 // The supplied parameter may be null, indicating that there are no persisted |
| 38 // details for the |browser_context| passed to GetDownloadDetails. | 37 // details for the |browser_context| passed to GetDownloadDetails. |
| 39 typedef base::Callback<void( | 38 typedef base::Callback<void( |
| 40 std::unique_ptr<ClientIncidentReport_DownloadDetails>)> | 39 std::unique_ptr<ClientIncidentReport_DownloadDetails>)> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // Contexts for each DownloadManager that has been added and has not yet | 91 // Contexts for each DownloadManager that has been added and has not yet |
| 93 // "gone down". | 92 // "gone down". |
| 94 ManagerToContextMap contexts_; | 93 ManagerToContextMap contexts_; |
| 95 | 94 |
| 96 DISALLOW_COPY_AND_ASSIGN(DownloadMetadataManager); | 95 DISALLOW_COPY_AND_ASSIGN(DownloadMetadataManager); |
| 97 }; | 96 }; |
| 98 | 97 |
| 99 } // namespace safe_browsing | 98 } // namespace safe_browsing |
| 100 | 99 |
| 101 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_DOWNLOAD_METADATA_MAN
AGER_H_ | 100 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_DOWNLOAD_METADATA_MAN
AGER_H_ |
| OLD | NEW |