| Index: chrome/browser/google_apis/gdata_wapi_requests.cc
|
| diff --git a/chrome/browser/google_apis/gdata_wapi_requests.cc b/chrome/browser/google_apis/gdata_wapi_requests.cc
|
| index c5cfdbef85e2440fa4850bae0c4a88c458e030ec..0b22d34f9d49cd76afefec90c7f3b6e24a078d16 100644
|
| --- a/chrome/browser/google_apis/gdata_wapi_requests.cc
|
| +++ b/chrome/browser/google_apis/gdata_wapi_requests.cc
|
| @@ -4,21 +4,20 @@
|
|
|
| #include "chrome/browser/google_apis/gdata_wapi_requests.h"
|
|
|
| +#include "base/location.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "base/task_runner_util.h"
|
| -#include "base/threading/sequenced_worker_pool.h"
|
| #include "base/values.h"
|
| #include "chrome/browser/google_apis/gdata_wapi_parser.h"
|
| #include "chrome/browser/google_apis/gdata_wapi_url_generator.h"
|
| +#include "chrome/browser/google_apis/request_sender.h"
|
| #include "chrome/browser/google_apis/request_util.h"
|
| #include "chrome/browser/google_apis/time_util.h"
|
| -#include "content/public/browser/browser_thread.h"
|
| #include "net/base/escape.h"
|
| #include "net/base/url_util.h"
|
| #include "third_party/libxml/chromium/libxml_utils.h"
|
|
|
| -using content::BrowserThread;
|
| using net::URLFetcher;
|
|
|
| namespace google_apis {
|
| @@ -57,9 +56,11 @@ void DidParseResourceListOnBlockingPool(
|
|
|
| // Parses the JSON value to ResourceList on the blocking pool and runs
|
| // |callback| on the UI thread once parsing is done.
|
| -void ParseResourceListAndRun(const GetResourceListCallback& callback,
|
| - GDataErrorCode error,
|
| - scoped_ptr<base::Value> value) {
|
| +void ParseResourceListAndRun(
|
| + scoped_refptr<base::TaskRunner> blocking_task_runner,
|
| + const GetResourceListCallback& callback,
|
| + GDataErrorCode error,
|
| + scoped_ptr<base::Value> value) {
|
| DCHECK(!callback.is_null());
|
|
|
| if (!value) {
|
| @@ -68,7 +69,7 @@ void ParseResourceListAndRun(const GetResourceListCallback& callback,
|
| }
|
|
|
| base::PostTaskAndReplyWithResult(
|
| - BrowserThread::GetBlockingPool(),
|
| + blocking_task_runner,
|
| FROM_HERE,
|
| base::Bind(&ParseResourceListOnBlockingPool, base::Passed(&value)),
|
| base::Bind(&DidParseResourceListOnBlockingPool, callback, error));
|
| @@ -162,8 +163,11 @@ GetResourceListRequest::GetResourceListRequest(
|
| const std::string& search_string,
|
| const std::string& directory_resource_id,
|
| const GetResourceListCallback& callback)
|
| - : GetDataRequest(sender,
|
| - base::Bind(&ParseResourceListAndRun, callback)),
|
| + : GetDataRequest(
|
| + sender,
|
| + base::Bind(&ParseResourceListAndRun,
|
| + make_scoped_refptr(sender->blocking_task_runner()),
|
| + callback)),
|
| url_generator_(url_generator),
|
| override_url_(override_url),
|
| start_changestamp_(start_changestamp),
|
| @@ -189,8 +193,11 @@ SearchByTitleRequest::SearchByTitleRequest(
|
| const std::string& title,
|
| const std::string& directory_resource_id,
|
| const GetResourceListCallback& callback)
|
| - : GetDataRequest(sender,
|
| - base::Bind(&ParseResourceListAndRun, callback)),
|
| + : GetDataRequest(
|
| + sender,
|
| + base::Bind(&ParseResourceListAndRun,
|
| + make_scoped_refptr(sender->blocking_task_runner()),
|
| + callback)),
|
| url_generator_(url_generator),
|
| title_(title),
|
| directory_resource_id_(directory_resource_id) {
|
|
|