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

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

Issue 10749015: gdrive: Get JSON feeds parsing off the UI thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix 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/gdata_operations.h
diff --git a/chrome/browser/chromeos/gdata/gdata_operations.h b/chrome/browser/chromeos/gdata/gdata_operations.h
index 1466ae8d9af8fd94f59f2f725b68e48d985e5a1b..9433540056322567835bb4e62d6e1e105fe80a0a 100644
--- a/chrome/browser/chromeos/gdata/gdata_operations.h
+++ b/chrome/browser/chromeos/gdata/gdata_operations.h
@@ -192,16 +192,26 @@ 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);
};
@@ -443,7 +453,8 @@ class AuthorizeAppsOperation : public GetDataOperation {
// Must override GetDataOperation's ParseResponse because the response is XML
// not JSON.
- virtual base::Value* ParseResponse(const std::string& data) OVERRIDE;
+ virtual bool ParseResponse(GDataErrorCode code,
+ const std::string& data) OVERRIDE;
private:
std::string app_id_;
GURL document_url_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_operations.cc » ('j') | chrome/browser/chromeos/gdata/gdata_operations.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698