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 #include "content/public/test/download_test_observer.h" | 5 #include "content/public/test/download_test_observer.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 BrowserThread::PostTask( | 181 BrowserThread::PostTask( |
182 BrowserThread::UI, FROM_HERE, | 182 BrowserThread::UI, FROM_HERE, |
183 base::Bind(&DenyDangerousDownload, download_manager_, | 183 base::Bind(&DenyDangerousDownload, download_manager_, |
184 download->GetId())); | 184 download->GetId())); |
185 break; | 185 break; |
186 | 186 |
187 case ON_DANGEROUS_DOWNLOAD_FAIL: | 187 case ON_DANGEROUS_DOWNLOAD_FAIL: |
188 ADD_FAILURE() << "Unexpected dangerous download item."; | 188 ADD_FAILURE() << "Unexpected dangerous download item."; |
189 break; | 189 break; |
190 | 190 |
| 191 case ON_DANGEROUS_DOWNLOAD_IGNORE: |
| 192 break; |
| 193 |
191 default: | 194 default: |
192 NOTREACHED(); | 195 NOTREACHED(); |
193 } | 196 } |
194 } | 197 } |
195 | 198 |
196 if (IsDownloadInFinalState(download)) | 199 if (IsDownloadInFinalState(download)) |
197 DownloadInFinalState(download); | 200 DownloadInFinalState(download); |
198 } | 201 } |
199 | 202 |
200 size_t DownloadTestObserver::NumDangerousDownloadsSeen() const { | 203 size_t DownloadTestObserver::NumDangerousDownloadsSeen() const { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 MessageLoopForUI::current()->Quit(); | 418 MessageLoopForUI::current()->Quit(); |
416 } | 419 } |
417 | 420 |
418 const DownloadUrlParameters::OnStartedCallback | 421 const DownloadUrlParameters::OnStartedCallback |
419 DownloadTestItemCreationObserver::callback() { | 422 DownloadTestItemCreationObserver::callback() { |
420 return base::Bind( | 423 return base::Bind( |
421 &DownloadTestItemCreationObserver::DownloadItemCreationCallback, this); | 424 &DownloadTestItemCreationObserver::DownloadItemCreationCallback, this); |
422 } | 425 } |
423 | 426 |
424 } // namespace content | 427 } // namespace content |
OLD | NEW |