| 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 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 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/containers/hash_tables.h" | 15 #include "base/containers/flat_map.h" |
| 16 #include "base/gtest_prod_util.h" | 16 #include "base/gtest_prod_util.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 19 #include "base/sequenced_task_runner.h" | 19 #include "base/sequenced_task_runner.h" |
| 20 #include "chrome/browser/download/download_path_reservation_tracker.h" | 20 #include "chrome/browser/download/download_path_reservation_tracker.h" |
| 21 #include "chrome/browser/download/download_target_determiner_delegate.h" | 21 #include "chrome/browser/download/download_target_determiner_delegate.h" |
| 22 #include "chrome/browser/download/download_target_info.h" | 22 #include "chrome/browser/download/download_target_info.h" |
| 23 #include "chrome/browser/safe_browsing/download_protection_service.h" | 23 #include "chrome/browser/safe_browsing/download_protection_service.h" |
| 24 #include "content/public/browser/download_danger_type.h" | 24 #include "content/public/browser/download_danger_type.h" |
| 25 #include "content/public/browser/download_item.h" | 25 #include "content/public/browser/download_item.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 std::unique_ptr<DownloadPrefs> download_prefs_; | 174 std::unique_ptr<DownloadPrefs> download_prefs_; |
| 175 | 175 |
| 176 // SequencedTaskRunner to check for file existence. A sequence is used so that | 176 // SequencedTaskRunner to check for file existence. A sequence is used so that |
| 177 // a large download history doesn't cause a large number of concurrent disk | 177 // a large download history doesn't cause a large number of concurrent disk |
| 178 // operations. | 178 // operations. |
| 179 const scoped_refptr<base::SequencedTaskRunner> | 179 const scoped_refptr<base::SequencedTaskRunner> |
| 180 check_for_file_existence_task_runner_; | 180 check_for_file_existence_task_runner_; |
| 181 | 181 |
| 182 #if BUILDFLAG(ENABLE_EXTENSIONS) | 182 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 183 // Maps from pending extension installations to DownloadItem IDs. | 183 // Maps from pending extension installations to DownloadItem IDs. |
| 184 typedef base::hash_map<extensions::CrxInstaller*, | 184 typedef base::flat_map<extensions::CrxInstaller*, |
| 185 content::DownloadOpenDelayedCallback> CrxInstallerMap; | 185 content::DownloadOpenDelayedCallback> |
| 186 CrxInstallerMap; |
| 186 CrxInstallerMap crx_installers_; | 187 CrxInstallerMap crx_installers_; |
| 187 #endif | 188 #endif |
| 188 | 189 |
| 189 content::NotificationRegistrar registrar_; | 190 content::NotificationRegistrar registrar_; |
| 190 | 191 |
| 191 base::WeakPtrFactory<ChromeDownloadManagerDelegate> weak_ptr_factory_; | 192 base::WeakPtrFactory<ChromeDownloadManagerDelegate> weak_ptr_factory_; |
| 192 | 193 |
| 193 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); | 194 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); |
| 194 }; | 195 }; |
| 195 | 196 |
| 196 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 197 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
| OLD | NEW |