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

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

Issue 10855034: Drive: Remove gdata_params.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review (#16) fix & rebase Created 8 years, 4 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 | « chrome/browser/chromeos/gdata/mock_gdata_file_system.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « chrome/browser/chromeos/gdata/mock_gdata_file_system.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698