summaryrefslogtreecommitdiffstats
path: root/content/browser/download
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/download')
-rw-r--r--content/browser/download/base_file_unittest.cc2
-rw-r--r--content/browser/download/download_browsertest.cc18
-rw-r--r--content/browser/download/download_file_unittest.cc7
-rw-r--r--content/browser/download/download_id_unittest.cc2
-rw-r--r--content/browser/download/download_item_impl_unittest.cc2
-rw-r--r--content/browser/download/download_manager_impl.cc2
-rw-r--r--content/browser/download/download_manager_impl_unittest.cc2
-rw-r--r--content/browser/download/drag_download_file.cc8
-rw-r--r--content/browser/download/drag_download_file.h2
-rw-r--r--content/browser/download/drag_download_file_browsertest.cc6
-rw-r--r--content/browser/download/mhtml_generation_browsertest.cc2
11 files changed, 28 insertions, 25 deletions
diff --git a/content/browser/download/base_file_unittest.cc b/content/browser/download/base_file_unittest.cc
index 0e6239f..7b53c4d 100644
--- a/content/browser/download/base_file_unittest.cc
+++ b/content/browser/download/base_file_unittest.cc
@@ -222,7 +222,7 @@ class BaseFileTest : public testing::Test {
DownloadInterruptReason expected_error_;
// Mock file thread to satisfy debug checks in BaseFile.
- MessageLoop message_loop_;
+ base::MessageLoop message_loop_;
BrowserThreadImpl file_thread_;
};
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index dd1ba30..f3ed766 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -240,7 +240,7 @@ void DownloadFileWithDelayFactory::AddRenameCallback(base::Closure callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
rename_callbacks_.push_back(callback);
if (waiting_)
- MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->Quit();
}
void DownloadFileWithDelayFactory::GetAllRenameCallbacks(
@@ -296,10 +296,12 @@ class CountingDownloadFile : public DownloadFileImpl {
// until data is returned.
static int GetNumberActiveFilesFromFileThread() {
int result = -1;
- BrowserThread::PostTaskAndReply(BrowserThread::FILE, FROM_HERE,
+ BrowserThread::PostTaskAndReply(
+ BrowserThread::FILE,
+ FROM_HERE,
base::Bind(&CountingDownloadFile::GetNumberActiveFiles, &result),
- MessageLoop::current()->QuitClosure());
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->QuitClosure());
+ base::MessageLoop::current()->Run();
DCHECK_NE(-1, result);
return result;
}
@@ -454,7 +456,7 @@ class DownloadCreateObserver : DownloadManager::Observer {
item_ = download;
if (waiting_)
- MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->Quit();
}
DownloadItem* WaitForFinished() {
@@ -568,9 +570,9 @@ class DownloadContentTest : public ContentBrowserTest {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&EnsureNoPendingDownloadJobsOnIO, &result));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
return result &&
- (CountingDownloadFile::GetNumberActiveFilesFromFileThread() == 0);
+ (CountingDownloadFile::GetNumberActiveFilesFromFileThread() == 0);
}
void DownloadAndWait(Shell* shell, const GURL& url,
@@ -679,7 +681,7 @@ class DownloadContentTest : public ContentBrowserTest {
if (URLRequestSlowDownloadJob::NumberOutstandingRequests())
*result = false;
BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE, MessageLoop::QuitClosure());
+ BrowserThread::UI, FROM_HERE, base::MessageLoop::QuitClosure());
}
// Location of the downloads directory for these tests
diff --git a/content/browser/download/download_file_unittest.cc b/content/browser/download/download_file_unittest.cc
index d26cbce..982692e 100644
--- a/content/browser/download/download_file_unittest.cc
+++ b/content/browser/download/download_file_unittest.cc
@@ -302,7 +302,7 @@ class DownloadFileTest : public testing::Test {
int64 bytes_per_sec_;
std::string hash_state_;
- MessageLoop loop_;
+ base::MessageLoop loop_;
private:
void SetRenameResult(bool* called_p,
@@ -592,8 +592,9 @@ TEST_F(DownloadFileTest, ConfirmUpdate) {
AppendDataToFile(chunks1, 2);
// Run the message loops for 750ms and check for results.
- loop_.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(),
- base::TimeDelta::FromMilliseconds(750));
+ loop_.PostDelayedTask(FROM_HERE,
+ base::MessageLoop::QuitClosure(),
+ base::TimeDelta::FromMilliseconds(750));
loop_.Run();
EXPECT_EQ(static_cast<int64>(strlen(kTestData1) + strlen(kTestData2)),
diff --git a/content/browser/download/download_id_unittest.cc b/content/browser/download/download_id_unittest.cc
index 55e6494..ad84c91 100644
--- a/content/browser/download/download_id_unittest.cc
+++ b/content/browser/download/download_id_unittest.cc
@@ -44,7 +44,7 @@ class DownloadIdTest : public testing::Test {
protected:
scoped_refptr<DownloadManager> download_managers_[2];
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
// Necessary to delete |DownloadManager|s.
BrowserThreadImpl ui_thread_;
size_t num_managers_;
diff --git a/content/browser/download/download_item_impl_unittest.cc b/content/browser/download/download_item_impl_unittest.cc
index caee4ae..275b4d2 100644
--- a/content/browser/download/download_item_impl_unittest.cc
+++ b/content/browser/download/download_item_impl_unittest.cc
@@ -325,7 +325,7 @@ class DownloadItemTest : public testing::Test {
}
private:
- MessageLoopForUI loop_;
+ base::MessageLoopForUI loop_;
TestBrowserThread ui_thread_; // UI thread
TestBrowserThread file_thread_; // FILE thread
StrictMock<MockDelegate> delegate_;
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index f48d46f..3fa9043 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -164,7 +164,7 @@ void EnsureNoPendingDownloadJobsOnFile(bool* result) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
*result = (DownloadFile::GetNumberOfDownloadFiles() == 0);
BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE, MessageLoop::QuitClosure());
+ BrowserThread::UI, FROM_HERE, base::MessageLoop::QuitClosure());
}
class DownloadItemFactoryImpl : public DownloadItemFactory {
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc
index c10a86a..2abb8f9 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -568,7 +568,7 @@ class DownloadManagerTest : public testing::Test {
base::FilePath intermediate_path_;
private:
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
TestBrowserThread ui_thread_;
TestBrowserThread file_thread_;
base::WeakPtr<MockDownloadItemFactory> mock_download_item_factory_;
diff --git a/content/browser/download/drag_download_file.cc b/content/browser/download/drag_download_file.cc
index 03dad10..5bbc9cb 100644
--- a/content/browser/download/drag_download_file.cc
+++ b/content/browser/download/drag_download_file.cc
@@ -37,7 +37,7 @@ class DragDownloadFile::DragDownloadFileUI : public DownloadItem::Observer {
const Referrer& referrer,
const std::string& referrer_encoding,
WebContents* web_contents,
- MessageLoop* on_completed_loop,
+ base::MessageLoop* on_completed_loop,
const OnCompleted& on_completed)
: on_completed_loop_(on_completed_loop),
on_completed_(on_completed),
@@ -132,7 +132,7 @@ class DragDownloadFile::DragDownloadFileUI : public DownloadItem::Observer {
download_item_ = NULL;
}
- MessageLoop* on_completed_loop_;
+ base::MessageLoop* on_completed_loop_;
OnCompleted on_completed_;
GURL url_;
Referrer referrer_;
@@ -154,7 +154,7 @@ DragDownloadFile::DragDownloadFile(const base::FilePath& file_path,
WebContents* web_contents)
: file_path_(file_path),
file_stream_(file_stream.Pass()),
- drag_message_loop_(MessageLoop::current()),
+ drag_message_loop_(base::MessageLoop::current()),
state_(INITIALIZED),
drag_ui_(NULL),
weak_ptr_factory_(this) {
@@ -231,7 +231,7 @@ void DragDownloadFile::DownloadCompleted(bool is_successful) {
void DragDownloadFile::CheckThread() {
#if defined(OS_WIN)
- DCHECK(drag_message_loop_ == MessageLoop::current());
+ DCHECK(drag_message_loop_ == base::MessageLoop::current());
#else
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
#endif
diff --git a/content/browser/download/drag_download_file.h b/content/browser/download/drag_download_file.h
index e97f585..2151d44 100644
--- a/content/browser/download/drag_download_file.h
+++ b/content/browser/download/drag_download_file.h
@@ -63,7 +63,7 @@ class CONTENT_EXPORT DragDownloadFile : public ui::DownloadFileProvider {
base::FilePath file_path_;
scoped_ptr<net::FileStream> file_stream_;
- MessageLoop* drag_message_loop_;
+ base::MessageLoop* drag_message_loop_;
State state_;
scoped_refptr<ui::DownloadFileObserver> observer_;
base::RunLoop nested_loop_;
diff --git a/content/browser/download/drag_download_file_browsertest.cc b/content/browser/download/drag_download_file_browsertest.cc
index 040ddce..ebbec59 100644
--- a/content/browser/download/drag_download_file_browsertest.cc
+++ b/content/browser/download/drag_download_file_browsertest.cc
@@ -52,9 +52,9 @@ class DragDownloadFileTest : public ContentBrowserTest {
virtual ~DragDownloadFileTest() {}
void Succeed() {
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
- MessageLoopForUI::current()->QuitClosure());
+ BrowserThread::PostTask(BrowserThread::UI,
+ FROM_HERE,
+ base::MessageLoopForUI::current()->QuitClosure());
}
void FailFast() {
diff --git a/content/browser/download/mhtml_generation_browsertest.cc b/content/browser/download/mhtml_generation_browsertest.cc
index 0bd0e52..26835dd 100644
--- a/content/browser/download/mhtml_generation_browsertest.cc
+++ b/content/browser/download/mhtml_generation_browsertest.cc
@@ -24,7 +24,7 @@ class MHTMLGenerationTest : public ContentBrowserTest {
void MHTMLGenerated(const base::FilePath& path, int64 size) {
mhtml_generated_ = true;
file_size_ = size;
- MessageLoopForUI::current()->Quit();
+ base::MessageLoopForUI::current()->Quit();
}
protected: