| 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 <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 | 446 |
| 447 DownloadTest() {} | 447 DownloadTest() {} |
| 448 | 448 |
| 449 virtual void SetUpOnMainThread() OVERRIDE { | 449 virtual void SetUpOnMainThread() OVERRIDE { |
| 450 BrowserThread::PostTask( | 450 BrowserThread::PostTask( |
| 451 BrowserThread::IO, FROM_HERE, | 451 BrowserThread::IO, FROM_HERE, |
| 452 base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); | 452 base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); |
| 453 ASSERT_TRUE(InitialSetup()); | 453 ASSERT_TRUE(InitialSetup()); |
| 454 } | 454 } |
| 455 | 455 |
| 456 virtual void CleanUpOnMainThread() OVERRIDE { | 456 virtual void TearDownOnMainThread() OVERRIDE { |
| 457 // Needs to be torn down on the main thread. file_activity_observer_ holds a | 457 // Needs to be torn down on the main thread. file_activity_observer_ holds a |
| 458 // reference to the ChromeDownloadManagerDelegate which should be destroyed | 458 // reference to the ChromeDownloadManagerDelegate which should be destroyed |
| 459 // on the UI thread. | 459 // on the UI thread. |
| 460 file_activity_observer_.reset(); | 460 file_activity_observer_.reset(); |
| 461 } | 461 } |
| 462 | 462 |
| 463 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 463 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 464 command_line->AppendSwitch(switches::kDisablePluginsDiscovery); | 464 command_line->AppendSwitch(switches::kDisablePluginsDiscovery); |
| 465 } | 465 } |
| 466 | 466 |
| (...skipping 2814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3281 *(downloads[0]))); | 3281 *(downloads[0]))); |
| 3282 | 3282 |
| 3283 // Begin feedback and check that the file is "stolen". | 3283 // Begin feedback and check that the file is "stolen". |
| 3284 download_protection_service->feedback_service()->BeginFeedbackForDownload( | 3284 download_protection_service->feedback_service()->BeginFeedbackForDownload( |
| 3285 downloads[0]); | 3285 downloads[0]); |
| 3286 std::vector<DownloadItem*> updated_downloads; | 3286 std::vector<DownloadItem*> updated_downloads; |
| 3287 GetDownloads(browser(), &updated_downloads); | 3287 GetDownloads(browser(), &updated_downloads); |
| 3288 ASSERT_TRUE(updated_downloads.empty()); | 3288 ASSERT_TRUE(updated_downloads.empty()); |
| 3289 } | 3289 } |
| 3290 #endif | 3290 #endif |
| OLD | NEW |