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

Unified Diff: chrome/browser/sync_file_system/drive_backend_v1/api_util.cc

Issue 63923002: net: Use SequencedTaskRunner for URLFetcherResponseWriter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add include Created 7 years, 1 month 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
Index: chrome/browser/sync_file_system/drive_backend_v1/api_util.cc
diff --git a/chrome/browser/sync_file_system/drive_backend_v1/api_util.cc b/chrome/browser/sync_file_system/drive_backend_v1/api_util.cc
index 4c5525e5ba78b174512616fd83ea01c18b63946d..773a992bb96bd3a515590b510ca65439227c2093 100644
--- a/chrome/browser/sync_file_system/drive_backend_v1/api_util.cc
+++ b/chrome/browser/sync_file_system/drive_backend_v1/api_util.cc
@@ -10,6 +10,7 @@
#include <string>
#include "base/file_util.h"
+#include "base/sequenced_task_runner.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/sequenced_worker_pool.h"
@@ -171,11 +172,15 @@ APIUtil::APIUtil(Profile* profile,
temp_dir_path_(temp_dir_path) {
ProfileOAuth2TokenService* oauth_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
+ base::SequencedWorkerPool* blocking_pool =
+ content::BrowserThread::GetBlockingPool();
+ scoped_refptr<base::SequencedTaskRunner> task_runner(
+ blocking_pool->GetSequencedTaskRunner(blocking_pool->GetSequenceToken()));
if (IsDriveAPIDisabled()) {
drive_service_.reset(new drive::GDataWapiService(
oauth_service,
profile->GetRequestContext(),
- content::BrowserThread::GetBlockingPool(),
+ task_runner.get(),
GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction),
GURL(google_apis::GDataWapiUrlGenerator::kBaseDownloadUrlForProduction),
std::string() /* custom_user_agent */));
@@ -183,7 +188,7 @@ APIUtil::APIUtil(Profile* profile,
drive_service_.reset(new drive::DriveAPIService(
oauth_service,
profile->GetRequestContext(),
- content::BrowserThread::GetBlockingPool(),
+ task_runner.get(),
GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction),
GURL(google_apis::DriveApiUrlGenerator::kBaseDownloadUrlForProduction),
GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction),

Powered by Google App Engine
This is Rietveld 408576698