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 e03eb4e8fd600df6786f4a3b2a9fc35fe2cf6f5f..5b480f8437ca4ad20fd7daf2949d38b14ad702a6 100644 |
--- a/chrome/browser/chromeos/gdata/operations_base.h |
+++ b/chrome/browser/chromeos/gdata/operations_base.h |
@@ -8,9 +8,11 @@ |
#include <string> |
#include <vector> |
+#include "base/callback.h" |
+#include "chrome/browser/chromeos/gdata/gdata_errorcode.h" |
#include "chrome/browser/chromeos/gdata/gdata_operation_registry.h" |
-#include "chrome/browser/chromeos/gdata/gdata_params.h" |
#include "chrome/common/net/gaia/oauth2_access_token_consumer.h" |
+#include "googleurl/src/gurl.h" |
#include "net/http/http_response_headers.h" |
#include "net/url_request/url_fetcher.h" |
#include "net/url_request/url_fetcher_delegate.h" |
@@ -21,6 +23,10 @@ namespace gdata { |
//================================ AuthOperation =============================== |
+// Callback type for authentication related DocumentService calls. |
+typedef base::Callback<void(GDataErrorCode error, |
+ const std::string& token)> AuthStatusCallback; |
+ |
// OAuth2 authorization token retrieval operation. |
class AuthOperation : public GDataOperationRegistry::Operation, |
public OAuth2AccessTokenConsumer { |
@@ -73,6 +79,11 @@ class GDataOperationInterface { |
//============================ UrlFetchOperationBase =========================== |
+// Callback type for getting the content from URLFetcher::GetResponseAsString(). |
+typedef base::Callback<void( |
+ GDataErrorCode error, |
+ scoped_ptr<std::string> content)> GetContentCallback; |
+ |
// Base class for operations that are fetching URLs. |
class UrlFetchOperationBase : public GDataOperationInterface, |
public GDataOperationRegistry::Operation, |
@@ -149,6 +160,10 @@ class UrlFetchOperationBase : public GDataOperationInterface, |
//============================ EntryActionOperation ============================ |
+// Callback type for Delete/Move DocumentServiceInterface calls. |
+typedef base::Callback<void(GDataErrorCode error, |
+ const GURL& document_url)> EntryActionCallback; |
+ |
// This class performs a simple action over a given entry (document/file). |
// It is meant to be used for operations that return no JSON blobs. |
class EntryActionOperation : public UrlFetchOperationBase { |
@@ -174,6 +189,12 @@ class EntryActionOperation : public UrlFetchOperationBase { |
//============================== GetDataOperation ============================== |
+// Callback type for DocumentServiceInterface::GetDocuments. |
+// Note: feed_data argument should be passed using base::Passed(&feed_data), not |
+// feed_data.Pass(). |
+typedef base::Callback<void(GDataErrorCode error, |
+ scoped_ptr<base::Value> feed_data)> GetDataCallback; |
+ |
// This class performs the operation for fetching and parsing JSON data content. |
class GetDataOperation : public UrlFetchOperationBase { |
public: |