OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_ |
6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_ | 6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/google_apis/base_operations.h" | 10 #include "chrome/browser/google_apis/base_operations.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // Overridden from GetDataOperation. | 131 // Overridden from GetDataOperation. |
132 virtual GURL GetURL() const OVERRIDE; | 132 virtual GURL GetURL() const OVERRIDE; |
133 | 133 |
134 private: | 134 private: |
135 const DriveApiUrlGenerator url_generator_; | 135 const DriveApiUrlGenerator url_generator_; |
136 std::string file_id_; | 136 std::string file_id_; |
137 | 137 |
138 DISALLOW_COPY_AND_ASSIGN(GetFileOperation); | 138 DISALLOW_COPY_AND_ASSIGN(GetFileOperation); |
139 }; | 139 }; |
140 | 140 |
141 // This namespace is introduced to avoid class name confliction between | 141 // This namespace is introduced to avoid class name conflict between |
142 // the operations for Drive API v2 and GData WAPI for transition. | 142 // the operations for Drive API v2 and GData WAPI for transition. |
143 // And, when the migration is done and GData WAPI's code is cleaned up, | 143 // And, when the migration is done and GData WAPI's code is cleaned up, |
144 // classes inside this namespace should be moved to the google_apis namespace. | 144 // classes inside this namespace should be moved to the google_apis namespace. |
145 // TODO(hidehiko): Get rid of this namespace after the migration. | 145 // TODO(hidehiko): Get rid of this namespace after the migration. |
146 namespace drive { | 146 namespace drive { |
147 | 147 |
148 //========================== CreateDirectoryOperation ========================== | 148 //========================== CreateDirectoryOperation ========================== |
149 | 149 |
150 // This class performs the operation for creating a directory. | 150 // This class performs the operation for creating a directory. |
151 class CreateDirectoryOperation : public GetDataOperation { | 151 class CreateDirectoryOperation : public GetDataOperation { |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 const std::string resource_id_; | 272 const std::string resource_id_; |
273 | 273 |
274 DISALLOW_COPY_AND_ASSIGN(InsertResourceOperation); | 274 DISALLOW_COPY_AND_ASSIGN(InsertResourceOperation); |
275 }; | 275 }; |
276 | 276 |
277 //========================== DeleteResourceOperation =========================== | 277 //========================== DeleteResourceOperation =========================== |
278 | 278 |
279 // This class performs the operation for removing a resource from a directory. | 279 // This class performs the operation for removing a resource from a directory. |
280 // Note that we use "delete" for the name of this class, which comes from the | 280 // Note that we use "delete" for the name of this class, which comes from the |
281 // operation name of the Drive API v2, although we prefer "remove" for that | 281 // operation name of the Drive API v2, although we prefer "remove" for that |
282 // sence in "drive/google_api" | 282 // sense in "drive/google_api" |
283 // Also note that this is the operation of "Children: delete" of the Drive API | 283 // Also note that this is the operation of "Children: delete" of the Drive API |
284 // v2. https://developers.google.com/drive/v2/reference/children/delete | 284 // v2. https://developers.google.com/drive/v2/reference/children/delete |
285 class DeleteResourceOperation : public EntryActionOperation { | 285 class DeleteResourceOperation : public EntryActionOperation { |
286 public: | 286 public: |
287 // |callback| must not be null. | 287 // |callback| must not be null. |
288 DeleteResourceOperation( | 288 DeleteResourceOperation( |
289 OperationRegistry* registry, | 289 OperationRegistry* registry, |
290 net::URLRequestContextGetter* url_request_context_getter, | 290 net::URLRequestContextGetter* url_request_context_getter, |
291 const DriveApiUrlGenerator& url_generator, | 291 const DriveApiUrlGenerator& url_generator, |
292 const std::string& parent_resource_id, | 292 const std::string& parent_resource_id, |
(...skipping 11 matching lines...) Expand all Loading... |
304 const std::string parent_resource_id_; | 304 const std::string parent_resource_id_; |
305 const std::string resource_id_; | 305 const std::string resource_id_; |
306 | 306 |
307 DISALLOW_COPY_AND_ASSIGN(DeleteResourceOperation); | 307 DISALLOW_COPY_AND_ASSIGN(DeleteResourceOperation); |
308 }; | 308 }; |
309 | 309 |
310 } // namespace drive | 310 } // namespace drive |
311 } // namespace google_apis | 311 } // namespace google_apis |
312 | 312 |
313 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_ | 313 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_ |
OLD | NEW |