| 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_GDATA_WAPI_OPERATIONS_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ |
| 6 #define CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ | 6 #define CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 //==================== RemoveResourceFromDirectoryOperation ==================== | 371 //==================== RemoveResourceFromDirectoryOperation ==================== |
| 372 | 372 |
| 373 // This class performs the operation for removing a document/file/directory | 373 // This class performs the operation for removing a document/file/directory |
| 374 // from a directory. | 374 // from a directory. |
| 375 class RemoveResourceFromDirectoryOperation : public EntryActionOperation { | 375 class RemoveResourceFromDirectoryOperation : public EntryActionOperation { |
| 376 public: | 376 public: |
| 377 // |callback| must not be null. | 377 // |callback| must not be null. |
| 378 RemoveResourceFromDirectoryOperation( | 378 RemoveResourceFromDirectoryOperation( |
| 379 OperationRegistry* registry, | 379 OperationRegistry* registry, |
| 380 net::URLRequestContextGetter* url_request_context_getter, | 380 net::URLRequestContextGetter* url_request_context_getter, |
| 381 const GDataWapiUrlGenerator& url_generator, |
| 381 const EntryActionCallback& callback, | 382 const EntryActionCallback& callback, |
| 382 const GURL& parent_content_url, | 383 const GURL& parent_content_url, |
| 383 const std::string& resource_id); | 384 const std::string& resource_id); |
| 384 virtual ~RemoveResourceFromDirectoryOperation(); | 385 virtual ~RemoveResourceFromDirectoryOperation(); |
| 385 | 386 |
| 386 protected: | 387 protected: |
| 387 // UrlFetchOperationBase overrides. | 388 // UrlFetchOperationBase overrides. |
| 388 virtual GURL GetURL() const OVERRIDE; | 389 virtual GURL GetURL() const OVERRIDE; |
| 389 virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE; | 390 virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE; |
| 390 virtual std::vector<std::string> GetExtraRequestHeaders() const OVERRIDE; | 391 virtual std::vector<std::string> GetExtraRequestHeaders() const OVERRIDE; |
| 391 | 392 |
| 392 private: | 393 private: |
| 394 const GDataWapiUrlGenerator url_generator_; |
| 393 const std::string resource_id_; | 395 const std::string resource_id_; |
| 394 const GURL parent_content_url_; | 396 const GURL parent_content_url_; |
| 395 | 397 |
| 396 DISALLOW_COPY_AND_ASSIGN(RemoveResourceFromDirectoryOperation); | 398 DISALLOW_COPY_AND_ASSIGN(RemoveResourceFromDirectoryOperation); |
| 397 }; | 399 }; |
| 398 | 400 |
| 399 //=========================== InitiateUploadOperation ========================== | 401 //=========================== InitiateUploadOperation ========================== |
| 400 | 402 |
| 401 // Struct for passing params needed for DriveServiceInterface::InitiateUpload() | 403 // Struct for passing params needed for DriveServiceInterface::InitiateUpload() |
| 402 // calls. | 404 // calls. |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 | 581 |
| 580 // Note: This should remain the last member so it'll be destroyed and | 582 // Note: This should remain the last member so it'll be destroyed and |
| 581 // invalidate its weak pointers before any other members are destroyed. | 583 // invalidate its weak pointers before any other members are destroyed. |
| 582 base::WeakPtrFactory<ResumeUploadOperation> weak_ptr_factory_; | 584 base::WeakPtrFactory<ResumeUploadOperation> weak_ptr_factory_; |
| 583 DISALLOW_COPY_AND_ASSIGN(ResumeUploadOperation); | 585 DISALLOW_COPY_AND_ASSIGN(ResumeUploadOperation); |
| 584 }; | 586 }; |
| 585 | 587 |
| 586 } // namespace google_apis | 588 } // namespace google_apis |
| 587 | 589 |
| 588 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ | 590 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ |
| OLD | NEW |