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

Unified Diff: chrome/browser/chromeos/gdata/operations_base.h

Issue 10799018: gdrive: Get JSON feeds parsing off the UI thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/chromeos/gdata/operations_base.h
diff --git a/chrome/browser/chromeos/gdata/operations_base.h b/chrome/browser/chromeos/gdata/operations_base.h
index cf8ee2c78eda275d794106450fff89f24c057c60..c0767647503c68fe1b8ae9b2914463cb1daab723 100644
--- a/chrome/browser/chromeos/gdata/operations_base.h
+++ b/chrome/browser/chromeos/gdata/operations_base.h
@@ -28,7 +28,7 @@ class AuthOperation : public GDataOperationRegistry::Operation,
public:
AuthOperation(GDataOperationRegistry* registry,
Profile* profile,
- const AuthStatusCallback& callback,
+const AuthStatusCallback& callback,
const std::string& refresh_token);
virtual ~AuthOperation();
void Start();
@@ -185,15 +185,24 @@ class GetDataOperation : public UrlFetchOperationBase {
virtual ~GetDataOperation();
// Parse GData JSON response.
- virtual base::Value* ParseResponse(const std::string& data);
+ virtual bool ParseResponse(GDataErrorCode fetch_error_code,
+ const std::string& data);
protected:
// Overridden from UrlFetchOperationBase.
virtual bool ProcessURLFetchResults(const net::URLFetcher* source) OVERRIDE;
- virtual void RunCallbackOnPrematureFailure(GDataErrorCode code) OVERRIDE;
+ virtual void RunCallbackOnPrematureFailure(
+ GDataErrorCode fetch_error_code) OVERRIDE;
+ void RunCallback(GDataErrorCode fetch_error_code,
+ scoped_ptr<base::Value> value);
private:
+ void OnDataParsed(GDataErrorCode fetch_error_code,
+ scoped_ptr<base::Value>* value);
+
GetDataCallback callback_;
+ base::WeakPtrFactory<GetDataOperation> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(GetDataOperation);
};
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_operations_unittest.cc ('k') | chrome/browser/chromeos/gdata/operations_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698