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

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

Issue 11444024: Clarify the use of the term "Document" in gdata_wapi_operations.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment on DeleteResourceOperation. Created 8 years 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/google_apis/gdata_wapi_operations.h
diff --git a/chrome/browser/google_apis/gdata_wapi_operations.h b/chrome/browser/google_apis/gdata_wapi_operations.h
index 61c273eb711b06111399cd2e3aaebbedb71da00c..1cfaee2b9c1e703ac63128ae25ce6d1364788bc0 100644
--- a/chrome/browser/google_apis/gdata_wapi_operations.h
+++ b/chrome/browser/google_apis/gdata_wapi_operations.h
@@ -76,19 +76,19 @@ class GetDocumentsOperation : public GetDataOperation {
DISALLOW_COPY_AND_ASSIGN(GetDocumentsOperation);
};
-//========================= GetDocumentEntryOperation ==========================
+//========================= GetResourceEntryOperation ==========================
-// This class performs the operation for fetching a single document entry.
-class GetDocumentEntryOperation : public GetDataOperation {
+// This class performs the operation for fetching a single resource entry.
+class GetResourceEntryOperation : public GetDataOperation {
public:
// |callback| must not be null.
- GetDocumentEntryOperation(
+ GetResourceEntryOperation(
OperationRegistry* registry,
net::URLRequestContextGetter* url_request_context_getter,
const GDataWapiUrlGenerator& url_generator,
const std::string& resource_id,
const GetDataCallback& callback);
- virtual ~GetDocumentEntryOperation();
+ virtual ~GetResourceEntryOperation();
protected:
// UrlFetchOperationBase overrides.
@@ -99,7 +99,7 @@ class GetDocumentEntryOperation : public GetDataOperation {
// Resource id of the requested entry.
const std::string resource_id_;
- DISALLOW_COPY_AND_ASSIGN(GetDocumentEntryOperation);
+ DISALLOW_COPY_AND_ASSIGN(GetResourceEntryOperation);
};
//========================= GetAccountMetadataOperation ========================
@@ -183,18 +183,23 @@ class DownloadFileOperation : public UrlFetchOperationBase {
DISALLOW_COPY_AND_ASSIGN(DownloadFileOperation);
};
-//=========================== DeleteDocumentOperation ==========================
+//=========================== DeleteResourceOperation ==========================
-// This class performs the operation for deleting a document.
-class DeleteDocumentOperation : public EntryActionOperation {
+// This class performs the operation for deleting a resource.
+//
+// In WAPI, "gd:deleted" means that the resource was put in the trash, and
+// "docs:removed" means its permanently gone. Since what the class does is to
+// put the resource into trash, we have chosen "Delete" in the name, even though
+// we are preferring the term "Remove" in drive/google_api code.
+class DeleteResourceOperation : public EntryActionOperation {
public:
// |callback| must not be null.
- DeleteDocumentOperation(
+ DeleteResourceOperation(
OperationRegistry* registry,
net::URLRequestContextGetter* url_request_context_getter,
const EntryActionCallback& callback,
const GURL& edit_url);
- virtual ~DeleteDocumentOperation();
+ virtual ~DeleteResourceOperation();
protected:
// UrlFetchOperationBase overrides.
@@ -205,7 +210,7 @@ class DeleteDocumentOperation : public EntryActionOperation {
private:
const GURL edit_url_;
- DISALLOW_COPY_AND_ASSIGN(DeleteDocumentOperation);
+ DISALLOW_COPY_AND_ASSIGN(DeleteResourceOperation);
};
//========================== CreateDirectoryOperation ==========================
@@ -241,22 +246,22 @@ class CreateDirectoryOperation : public GetDataOperation {
DISALLOW_COPY_AND_ASSIGN(CreateDirectoryOperation);
};
-//============================ CopyDocumentOperation ===========================
+//============================ CopyHostedDocumentOperation =====================
// This class performs the operation for making a copy of a hosted document.
// Note that this function cannot be used to copy regular files, as it's not
// supported by WAPI.
-class CopyDocumentOperation : public GetDataOperation {
+class CopyHostedDocumentOperation : public GetDataOperation {
public:
// |callback| must not be null.
- CopyDocumentOperation(
+ CopyHostedDocumentOperation(
OperationRegistry* registry,
net::URLRequestContextGetter* url_request_context_getter,
const GDataWapiUrlGenerator& url_generator,
const GetDataCallback& callback,
const std::string& resource_id,
const FilePath::StringType& new_name);
- virtual ~CopyDocumentOperation();
+ virtual ~CopyHostedDocumentOperation();
protected:
// UrlFetchOperationBase overrides.
@@ -270,7 +275,7 @@ class CopyDocumentOperation : public GetDataOperation {
const std::string resource_id_;
const FilePath::StringType new_name_;
- DISALLOW_COPY_AND_ASSIGN(CopyDocumentOperation);
+ DISALLOW_COPY_AND_ASSIGN(CopyHostedDocumentOperation);
};
//=========================== RenameResourceOperation ==========================
@@ -371,7 +376,7 @@ class AddResourceToDirectoryOperation : public EntryActionOperation {
//==================== RemoveResourceFromDirectoryOperation ====================
-// This class performs the operation for adding a document/file/directory
+// This class performs the operation for removing a document/file/directory
// from a directory.
class RemoveResourceFromDirectoryOperation : public EntryActionOperation {
public:
« no previous file with comments | « no previous file | chrome/browser/google_apis/gdata_wapi_operations.cc » ('j') | chrome/browser/google_apis/gdata_wapi_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698