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

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

Issue 12387021: Move the responsibility to convert from JSON to FileResource into drive_api_operations. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Minor fix to address review comments. Created 7 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/google_apis/drive_api_operations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/drive_api_operations.h
diff --git a/chrome/browser/google_apis/drive_api_operations.h b/chrome/browser/google_apis/drive_api_operations.h
index 527fca659dab950c22975579519a3cac15f9c8d7..661ce308a42a81123fc2fd0a1224f2d765ffeee3 100644
--- a/chrome/browser/google_apis/drive_api_operations.h
+++ b/chrome/browser/google_apis/drive_api_operations.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/callback_forward.h"
#include "chrome/browser/google_apis/base_operations.h"
#include "chrome/browser/google_apis/drive_api_url_generator.h"
#include "chrome/browser/google_apis/drive_service_interface.h"
@@ -17,6 +18,15 @@ class URLRequestContextGetter;
namespace google_apis {
+class FileResource;
+
+// Callback used for operations that the server returns FileResource data
+// formatted into JSON value.
+typedef base::Callback<void(GDataErrorCode error,
+ scoped_ptr<FileResource> entry)>
+ FileResourceCallback;
+
+
//============================== GetAboutOperation =============================
// This class performs the operation for fetching About data.
@@ -125,7 +135,7 @@ class GetFileOperation : public GetDataOperation {
net::URLRequestContextGetter* url_request_context_getter,
const DriveApiUrlGenerator& url_generator,
const std::string& file_id,
- const GetDataCallback& callback);
+ const FileResourceCallback& callback);
virtual ~GetFileOperation();
protected:
@@ -157,7 +167,7 @@ class CreateDirectoryOperation : public GetDataOperation {
const DriveApiUrlGenerator& url_generator,
const std::string& parent_resource_id,
const std::string& directory_name,
- const GetDataCallback& callback);
+ const FileResourceCallback& callback);
virtual ~CreateDirectoryOperation();
protected:
« no previous file with comments | « no previous file | chrome/browser/google_apis/drive_api_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698