Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: chrome/browser/download/download_browsertest.cc

Issue 8873032: Removing MessageLoop::QuitTask() from chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert 3 more problematic files Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 slow_download_job_pending_requests_ = 125 slow_download_job_pending_requests_ =
126 URLRequestSlowDownloadJob::NumberOutstandingRequests(); 126 URLRequestSlowDownloadJob::NumberOutstandingRequests();
127 BrowserThread::PostTask( 127 BrowserThread::PostTask(
128 BrowserThread::FILE, FROM_HERE, 128 BrowserThread::FILE, FROM_HERE,
129 base::Bind(&CancelTestDataCollector::FileInfoCollector, this)); 129 base::Bind(&CancelTestDataCollector::FileInfoCollector, this));
130 } 130 }
131 131
132 void FileInfoCollector() { 132 void FileInfoCollector() {
133 dfm_pending_downloads_ = download_file_manager_->NumberOfActiveDownloads(); 133 dfm_pending_downloads_ = download_file_manager_->NumberOfActiveDownloads();
134 BrowserThread::PostTask( 134 BrowserThread::PostTask(
135 BrowserThread::UI, FROM_HERE, new MessageLoop::QuitTask()); 135 BrowserThread::UI, FROM_HERE, MessageLoop::QuitClosure());
136 } 136 }
137 137
138 ResourceDispatcherHost* resource_dispatcher_host_; 138 ResourceDispatcherHost* resource_dispatcher_host_;
139 DownloadFileManager* download_file_manager_; 139 DownloadFileManager* download_file_manager_;
140 int slow_download_job_pending_requests_; 140 int slow_download_job_pending_requests_;
141 int dfm_pending_downloads_; 141 int dfm_pending_downloads_;
142 142
143 DISALLOW_COPY_AND_ASSIGN(CancelTestDataCollector); 143 DISALLOW_COPY_AND_ASSIGN(CancelTestDataCollector);
144 }; 144 };
145 145
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 search_results.clear(); 1663 search_results.clear();
1664 1664
1665 manager->SearchDownloads(UTF8ToUTF16("another_file"), &search_results); 1665 manager->SearchDownloads(UTF8ToUTF16("another_file"), &search_results);
1666 ASSERT_EQ(2u, search_results.size()); 1666 ASSERT_EQ(2u, search_results.size());
1667 std::sort(search_results.begin(), search_results.end(), 1667 std::sort(search_results.begin(), search_results.end(),
1668 DownloadItemSorter); 1668 DownloadItemSorter);
1669 EXPECT_EQ(2, search_results[0]->GetDbHandle()); 1669 EXPECT_EQ(2, search_results[0]->GetDbHandle());
1670 EXPECT_EQ(3, search_results[1]->GetDbHandle()); 1670 EXPECT_EQ(3, search_results[1]->GetDbHandle());
1671 search_results.clear(); 1671 search_results.clear();
1672 } 1672 }
OLDNEW
« no previous file with comments | « chrome/browser/debugger/devtools_sanity_unittest.cc ('k') | chrome/browser/download/download_test_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698