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

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

Issue 10877006: Rename GDataErrorCode to DriveErrorCode, GDataFileError to DriveFileError (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 d5ee3d7c36b0a2fcecdb36c0998cd5205ab94656..df7565b5dfdf564cdd5eb158992930e5ef787dd0 100644
--- a/chrome/browser/chromeos/gdata/operations_base.h
+++ b/chrome/browser/chromeos/gdata/operations_base.h
@@ -9,7 +9,7 @@
#include <vector>
#include "base/callback.h"
-#include "chrome/browser/chromeos/gdata/gdata_errorcode.h"
+#include "chrome/browser/chromeos/gdata/drive_errorcode.h"
#include "chrome/browser/chromeos/gdata/operation_registry.h"
#include "chrome/common/net/gaia/oauth2_access_token_consumer.h"
#include "googleurl/src/gurl.h"
@@ -24,7 +24,7 @@ namespace gdata {
//================================ AuthOperation ===============================
// Callback type for authentication related DriveServiceInterface calls.
-typedef base::Callback<void(GDataErrorCode error,
+typedef base::Callback<void(DriveErrorCode error,
const std::string& token)> AuthStatusCallback;
// OAuth2 authorization token retrieval operation.
@@ -69,7 +69,7 @@ class GDataOperationInterface {
virtual void Start(const std::string& auth_token) = 0;
// Invoked when the authentication failed with an error code |code|.
- virtual void OnAuthFailed(GDataErrorCode code) = 0;
+ virtual void OnAuthFailed(DriveErrorCode code) = 0;
// Sets the callback to DriveServiceInterface when the operation restarts due
// to an authentication failure.
@@ -81,7 +81,7 @@ class GDataOperationInterface {
// Callback type for getting the content from URLFetcher::GetResponseAsString().
typedef base::Callback<void(
- GDataErrorCode error,
+ DriveErrorCode error,
scoped_ptr<std::string> content)> GetContentCallback;
// Base class for operations that are fetching URLs.
@@ -129,7 +129,7 @@ class UrlFetchOperationBase : public GDataOperationInterface,
// Invoked by this base class upon an authentication error or cancel by
// an user operation. Must be implemented by a derived class.
- virtual void RunCallbackOnPrematureFailure(GDataErrorCode code) = 0;
+ virtual void RunCallbackOnPrematureFailure(DriveErrorCode code) = 0;
// Implement OperationRegistry::Operation
virtual void DoCancel() OVERRIDE;
@@ -138,14 +138,14 @@ class UrlFetchOperationBase : public GDataOperationInterface,
virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
// Overridden from GDataOperationInterface.
- virtual void OnAuthFailed(GDataErrorCode code) OVERRIDE;
+ virtual void OnAuthFailed(DriveErrorCode code) OVERRIDE;
// Invoked when ProcessURLFetchResults() is completed.
void OnProcessURLFetchResultsComplete(bool result);
- // Returns an appropriate GDataErrorCode based on the HTTP response code and
+ // Returns an appropriate DriveErrorCode based on the HTTP response code and
// the status of the URLFetcher.
- GDataErrorCode GetErrorCode(const net::URLFetcher* source) const;
+ DriveErrorCode GetErrorCode(const net::URLFetcher* source) const;
std::string GetResponseHeadersAsString(
const net::URLFetcher* url_fetcher);
@@ -161,7 +161,7 @@ class UrlFetchOperationBase : public GDataOperationInterface,
//============================ EntryActionOperation ============================
// Callback type for Delete/Move DocumentServiceInterface calls.
-typedef base::Callback<void(GDataErrorCode error,
+typedef base::Callback<void(DriveErrorCode error,
const GURL& document_url)> EntryActionCallback;
// This class performs a simple action over a given entry (document/file).
@@ -176,7 +176,7 @@ class EntryActionOperation : public UrlFetchOperationBase {
protected:
// Overridden from UrlFetchOperationBase.
virtual void ProcessURLFetchResults(const net::URLFetcher* source) OVERRIDE;
- virtual void RunCallbackOnPrematureFailure(GDataErrorCode code) OVERRIDE;
+ virtual void RunCallbackOnPrematureFailure(DriveErrorCode code) OVERRIDE;
const GURL& document_url() const { return document_url_; }
@@ -192,7 +192,7 @@ class EntryActionOperation : public UrlFetchOperationBase {
// 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,
+typedef base::Callback<void(DriveErrorCode error,
scoped_ptr<base::Value> feed_data)> GetDataCallback;
// This class performs the operation for fetching and parsing JSON data content.
@@ -203,20 +203,20 @@ class GetDataOperation : public UrlFetchOperationBase {
virtual ~GetDataOperation();
// Parse GData JSON response.
- virtual void ParseResponse(GDataErrorCode fetch_error_code,
+ virtual void ParseResponse(DriveErrorCode fetch_error_code,
const std::string& data);
protected:
// Overridden from UrlFetchOperationBase.
virtual void ProcessURLFetchResults(const net::URLFetcher* source) OVERRIDE;
virtual void RunCallbackOnPrematureFailure(
- GDataErrorCode fetch_error_code) OVERRIDE;
- void RunCallback(GDataErrorCode fetch_error_code,
+ DriveErrorCode fetch_error_code) OVERRIDE;
+ void RunCallback(DriveErrorCode fetch_error_code,
scoped_ptr<base::Value> value);
private:
// Called when ParseJsonOnBlockingPool() is completed.
- void OnDataParsed(gdata::GDataErrorCode fetch_error_code,
+ void OnDataParsed(gdata::DriveErrorCode fetch_error_code,
scoped_ptr<base::Value>* value);
GetDataCallback callback_;

Powered by Google App Engine
This is Rietveld 408576698