| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 scoped_refptr<DownloadManager> download_manager_; | 92 scoped_refptr<DownloadManager> download_manager_; |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 friend class base::RefCountedThreadSafe<ChromeDownloadManagerDelegate>; | 95 friend class base::RefCountedThreadSafe<ChromeDownloadManagerDelegate>; |
| 96 | 96 |
| 97 // content::NotificationObserver implementation. | 97 // content::NotificationObserver implementation. |
| 98 virtual void Observe(int type, | 98 virtual void Observe(int type, |
| 99 const content::NotificationSource& source, | 99 const content::NotificationSource& source, |
| 100 const content::NotificationDetails& details) OVERRIDE; | 100 const content::NotificationDetails& details) OVERRIDE; |
| 101 | 101 |
| 102 // Returns the SafeBrowsing download protection service if it's |
| 103 // enabled. Returns NULL otherwise. |
| 104 safe_browsing::DownloadProtectionService* GetDownloadProtectionService(); |
| 105 |
| 102 // Callback function after url is checked with safebrowsing service. | 106 // Callback function after url is checked with safebrowsing service. |
| 103 void CheckDownloadUrlDone( | 107 void CheckDownloadUrlDone( |
| 104 int32 download_id, | 108 int32 download_id, |
| 105 safe_browsing::DownloadProtectionService::DownloadCheckResult result); | 109 safe_browsing::DownloadProtectionService::DownloadCheckResult result); |
| 106 | 110 |
| 107 // Callback function after the DownloadProtectionService completes. | 111 // Callback function after the DownloadProtectionService completes. |
| 108 void CheckClientDownloadDone( | 112 void CheckClientDownloadDone( |
| 109 int32 download_id, | 113 int32 download_id, |
| 110 safe_browsing::DownloadProtectionService::DownloadCheckResult result); | 114 safe_browsing::DownloadProtectionService::DownloadCheckResult result); |
| 111 | 115 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 }; | 158 }; |
| 155 typedef base::hash_map<int, SafeBrowsingState> SafeBrowsingStateMap; | 159 typedef base::hash_map<int, SafeBrowsingState> SafeBrowsingStateMap; |
| 156 SafeBrowsingStateMap safe_browsing_state_; | 160 SafeBrowsingStateMap safe_browsing_state_; |
| 157 | 161 |
| 158 content::NotificationRegistrar registrar_; | 162 content::NotificationRegistrar registrar_; |
| 159 | 163 |
| 160 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); | 164 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); |
| 161 }; | 165 }; |
| 162 | 166 |
| 163 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 167 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
| OLD | NEW |