summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_manager_unittest.cc
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-28 12:44:49 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-28 12:44:49 +0000
commitc38831a108f9f905ce9e68503ee67274939cc950 (patch)
tree7c93c8afd386fdc11a0f03855cee62c2d3449d63 /chrome/browser/download/download_manager_unittest.cc
parent75c753a51b150912055d7a8305cf77134d24816a (diff)
downloadchromium_src-c38831a108f9f905ce9e68503ee67274939cc950.zip
chromium_src-c38831a108f9f905ce9e68503ee67274939cc950.tar.gz
chromium_src-c38831a108f9f905ce9e68503ee67274939cc950.tar.bz2
Split BrowserThread into public API and private implementation, step 1.
Only content/ now has the ability to create BrowserThread objects, with the exception that tests can create the content::TestBrowserThread subclass, and (temporarily) code in chrome/ can create the DeprecatedBrowserThread subclass. A follow-up change will make content/ take care of its own thread creation, remove DeprecatedBrowserThread, and move all state and non-trivial constructors from BrowserThread down to BrowserThreadImpl. Also moved BrowserProcessSubThread into content/ namespace. As part of follow-up cleanup, chrome/ will stop using this class. BUG=98716 TEST=existing Review URL: http://codereview.chromium.org/8392042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107718 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_manager_unittest.cc')
-rw-r--r--chrome/browser/download/download_manager_unittest.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/download/download_manager_unittest.cc b/chrome/browser/download/download_manager_unittest.cc
index feccbe8..58b905f 100644
--- a/chrome/browser/download/download_manager_unittest.cc
+++ b/chrome/browser/download/download_manager_unittest.cc
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <string>
#include <set>
+#include <string>
#include "base/bind.h"
#include "base/file_util.h"
@@ -22,7 +22,6 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/download/download_buffer.h"
#include "content/browser/download/download_create_info.h"
#include "content/browser/download/download_file.h"
@@ -33,6 +32,7 @@
#include "content/browser/download/download_status_updater.h"
#include "content/browser/download/interrupt_reasons.h"
#include "content/browser/download/mock_download_manager.h"
+#include "content/test/test_browser_thread.h"
#include "grit/generated_resources.h"
#include "net/base/io_buffer.h"
#include "net/base/mock_file_stream.h"
@@ -124,8 +124,8 @@ class DownloadManagerTest : public testing::Test {
scoped_refptr<DownloadManager> download_manager_;
scoped_refptr<DownloadFileManager> file_manager_;
MessageLoopForUI message_loop_;
- BrowserThread ui_thread_;
- BrowserThread file_thread_;
+ content::TestBrowserThread ui_thread_;
+ content::TestBrowserThread file_thread_;
scoped_refptr<content::DownloadBuffer> download_buffer_;
DownloadFileManager* file_manager() {
@@ -366,7 +366,7 @@ class ItemObserver : public DownloadItem::Observer {
} // namespace
TEST_F(DownloadManagerTest, StartDownload) {
- BrowserThread io_thread(BrowserThread::IO, &message_loop_);
+ content::TestBrowserThread io_thread(BrowserThread::IO, &message_loop_);
PrefService* prefs = profile_->GetPrefs();
prefs->SetFilePath(prefs::kDownloadDefaultDirectory, FilePath());
DownloadPrefs* download_prefs =