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

Unified Diff: chrome/browser/google_apis/base_requests.h

Issue 18742002: Remove direct reference to GetBlockingPool() in c/b/google_apis. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
Index: chrome/browser/google_apis/base_requests.h
diff --git a/chrome/browser/google_apis/base_requests.h b/chrome/browser/google_apis/base_requests.h
index d57a6c6a389a25bd176d73452448e20b22014a72..3c9ff15239c899b9f883755f57e292ca3a490755 100644
--- a/chrome/browser/google_apis/base_requests.h
+++ b/chrome/browser/google_apis/base_requests.h
@@ -35,10 +35,12 @@ typedef base::Callback<void(scoped_ptr<base::Value> value)> ParseJsonCallback;
// Callback used for DownloadFileRequest and ResumeUploadRequestBase.
typedef base::Callback<void(int64 progress, int64 total)> ProgressCallback;
-// Parses JSON passed in |json| on blocking pool. Runs |callback| on the calling
-// thread when finished with either success or failure.
+// Parses JSON passed in |json| on |blocking_task_runner|. Runs |callback| on
+// the calling thread when finished with either success or failure.
// The callback must not be null.
-void ParseJson(const std::string& json, const ParseJsonCallback& callback);
+void ParseJson(base::TaskRunner* blocking_task_runner,
+ const std::string& json,
+ const ParseJsonCallback& callback);
//======================= AuthenticatedRequestInterface ======================
@@ -146,6 +148,9 @@ class UrlFetchRequestBase : public AuthenticatedRequestInterface,
// Returns true if called on the thread where the constructor was called.
bool CalledOnValidThread();
+ // Returns the task runner that should be used for blocking tasks.
+ base::TaskRunner* blocking_task_runner() const;
+
private:
// URLFetcherDelegate overrides.
virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698