| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 void OnItemAddedToPersistentStore(int32 download_id, int64 db_handle); | 138 void OnItemAddedToPersistentStore(int32 download_id, int64 db_handle); |
| 139 | 139 |
| 140 Profile* profile_; | 140 Profile* profile_; |
| 141 scoped_ptr<DownloadPrefs> download_prefs_; | 141 scoped_ptr<DownloadPrefs> download_prefs_; |
| 142 scoped_ptr<DownloadHistory> download_history_; | 142 scoped_ptr<DownloadHistory> download_history_; |
| 143 | 143 |
| 144 // Maps from pending extension installations to DownloadItem IDs. | 144 // Maps from pending extension installations to DownloadItem IDs. |
| 145 typedef base::hash_map<CrxInstaller*, int> CrxInstallerMap; | 145 typedef base::hash_map<CrxInstaller*, int> CrxInstallerMap; |
| 146 CrxInstallerMap crx_installers_; | 146 CrxInstallerMap crx_installers_; |
| 147 | 147 |
| 148 // Maps the SafeBrowsing download check state to a DownloadItem ID. | |
| 149 struct SafeBrowsingState { | |
| 150 // If true the SafeBrowsing check is not done yet. | |
| 151 bool pending; | |
| 152 // The verdict that we got from calling CheckClientDownload. | |
| 153 safe_browsing::DownloadProtectionService::DownloadCheckResult verdict; | |
| 154 }; | |
| 155 typedef base::hash_map<int, SafeBrowsingState> SafeBrowsingStateMap; | |
| 156 SafeBrowsingStateMap safe_browsing_state_; | |
| 157 | |
| 158 content::NotificationRegistrar registrar_; | 148 content::NotificationRegistrar registrar_; |
| 159 | 149 |
| 160 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); | 150 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); |
| 161 }; | 151 }; |
| 162 | 152 |
| 163 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 153 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
| OLD | NEW |