| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 void OnItemAddedToPersistentStore(int32 download_id, int64 db_handle); | 142 void OnItemAddedToPersistentStore(int32 download_id, int64 db_handle); |
| 143 | 143 |
| 144 Profile* profile_; | 144 Profile* profile_; |
| 145 scoped_ptr<DownloadPrefs> download_prefs_; | 145 scoped_ptr<DownloadPrefs> download_prefs_; |
| 146 scoped_ptr<DownloadHistory> download_history_; | 146 scoped_ptr<DownloadHistory> download_history_; |
| 147 | 147 |
| 148 // Maps from pending extension installations to DownloadItem IDs. | 148 // Maps from pending extension installations to DownloadItem IDs. |
| 149 typedef base::hash_map<CrxInstaller*, int> CrxInstallerMap; | 149 typedef base::hash_map<CrxInstaller*, int> CrxInstallerMap; |
| 150 CrxInstallerMap crx_installers_; | 150 CrxInstallerMap crx_installers_; |
| 151 | 151 |
| 152 // Maps the SafeBrowsing download check state to a DownloadItem ID. | |
| 153 struct SafeBrowsingState { | |
| 154 // If true the SafeBrowsing check is not done yet. | |
| 155 bool pending; | |
| 156 // The verdict that we got from calling CheckClientDownload. | |
| 157 safe_browsing::DownloadProtectionService::DownloadCheckResult verdict; | |
| 158 }; | |
| 159 typedef base::hash_map<int, SafeBrowsingState> SafeBrowsingStateMap; | |
| 160 SafeBrowsingStateMap safe_browsing_state_; | |
| 161 | |
| 162 content::NotificationRegistrar registrar_; | 152 content::NotificationRegistrar registrar_; |
| 163 | 153 |
| 164 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); | 154 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); |
| 165 }; | 155 }; |
| 166 | 156 |
| 167 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 157 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
| OLD | NEW |