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

Unified Diff: chrome/browser/google_apis/drive_uploader_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/google_apis/drive_uploader.cc ('k') | chrome/browser/google_apis/fake_drive_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/drive_uploader_unittest.cc
diff --git a/chrome/browser/google_apis/drive_uploader_unittest.cc b/chrome/browser/google_apis/drive_uploader_unittest.cc
index 34f96e2c681d7856680ce7f4075f2fd6bc0e2586..3ed550bff26fb3b281ddd0541198be72e9b34c6f 100644
--- a/chrome/browser/google_apis/drive_uploader_unittest.cc
+++ b/chrome/browser/google_apis/drive_uploader_unittest.cc
@@ -74,7 +74,7 @@ class MockDriveServiceWithUploadExpectation : public DummyDriveService {
// Calls back the upload URL for subsequent ResumeUpload operations.
// InitiateUpload is an asynchronous function, so don't callback directly.
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(callback, HTTP_SUCCESS, GURL(kTestUploadNewFileURL)));
}
@@ -90,14 +90,14 @@ class MockDriveServiceWithUploadExpectation : public DummyDriveService {
EXPECT_EQ(kTestInitiateUploadResourceId, resource_id);
if (!etag.empty() && etag != kTestETag) {
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(callback, HTTP_PRECONDITION, GURL()));
return;
}
// Calls back the upload URL for subsequent ResumeUpload operations.
// InitiateUpload is an asynchronous function, so don't callback directly.
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(callback, HTTP_SUCCESS, GURL(kTestUploadExistingFileURL)));
}
@@ -138,7 +138,7 @@ class MockDriveServiceWithUploadExpectation : public DummyDriveService {
// For the testing purpose, it always notifies the progress at the end of
// each chunk uploading.
int64 chunk_size = end_position - start_position;
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(progress_callback, chunk_size, chunk_size));
}
@@ -178,7 +178,7 @@ class MockDriveServiceWithUploadExpectation : public DummyDriveService {
HTTP_RESUME_INCOMPLETE, 0, received_bytes_);
}
// ResumeUpload is an asynchronous function, so don't callback directly.
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(callback, response, base::Passed(&entry)));
}
@@ -198,7 +198,7 @@ class MockDriveServiceNoConnectionAtInitiate : public DummyDriveService {
const std::string& parent_resource_id,
const std::string& title,
const InitiateUploadCallback& callback) OVERRIDE {
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(callback, GDATA_NO_CONNECTION, GURL()));
}
@@ -209,7 +209,7 @@ class MockDriveServiceNoConnectionAtInitiate : public DummyDriveService {
const std::string& resource_id,
const std::string& etag,
const InitiateUploadCallback& callback) OVERRIDE {
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(callback, GDATA_NO_CONNECTION, GURL()));
}
@@ -238,7 +238,7 @@ class MockDriveServiceNoConnectionAtResume : public DummyDriveService {
const std::string& parent_resource_id,
const std::string& title,
const InitiateUploadCallback& callback) OVERRIDE {
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(callback, HTTP_SUCCESS, GURL(kTestUploadNewFileURL)));
}
@@ -249,7 +249,7 @@ class MockDriveServiceNoConnectionAtResume : public DummyDriveService {
const std::string& resource_id,
const std::string& etag,
const InitiateUploadCallback& callback) OVERRIDE {
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(callback, HTTP_SUCCESS, GURL(kTestUploadExistingFileURL)));
}
@@ -264,7 +264,7 @@ class MockDriveServiceNoConnectionAtResume : public DummyDriveService {
const base::FilePath& local_file_path,
const UploadRangeCallback& callback,
const ProgressCallback& progress_callback) OVERRIDE {
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(callback,
UploadRangeResponse(GDATA_NO_CONNECTION, -1, -1),
base::Passed(scoped_ptr<ResourceEntry>())));
@@ -286,7 +286,7 @@ class DriveUploaderTest : public testing::Test {
}
protected:
- MessageLoopForUI message_loop_;
+ base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
base::ScopedTempDir temp_dir_;
};
« no previous file with comments | « chrome/browser/google_apis/drive_uploader.cc ('k') | chrome/browser/google_apis/fake_drive_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698