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

Side by Side Diff: chrome/browser/google_apis/gdata_wapi_requests.h

Issue 17415007: Get rid of RequestRegistry (part 3): remove Drive path from request objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_REQUESTS_H_ 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_REQUESTS_H_
6 #define CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_REQUESTS_H_ 6 #define CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_REQUESTS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 // |title| should be set. 393 // |title| should be set.
394 // |parent_upload_url| should be the upload_url() of the parent directory. 394 // |parent_upload_url| should be the upload_url() of the parent directory.
395 // (resumable-create-media URL) 395 // (resumable-create-media URL)
396 // See also the comments of InitiateUploadRequestBase for more details 396 // See also the comments of InitiateUploadRequestBase for more details
397 // about the other parameters. 397 // about the other parameters.
398 InitiateUploadNewFileRequest( 398 InitiateUploadNewFileRequest(
399 RequestSender* runner, 399 RequestSender* runner,
400 net::URLRequestContextGetter* url_request_context_getter, 400 net::URLRequestContextGetter* url_request_context_getter,
401 const GDataWapiUrlGenerator& url_generator, 401 const GDataWapiUrlGenerator& url_generator,
402 const InitiateUploadCallback& callback, 402 const InitiateUploadCallback& callback,
403 const base::FilePath& drive_file_path,
404 const std::string& content_type, 403 const std::string& content_type,
405 int64 content_length, 404 int64 content_length,
406 const std::string& parent_resource_id, 405 const std::string& parent_resource_id,
407 const std::string& title); 406 const std::string& title);
408 virtual ~InitiateUploadNewFileRequest(); 407 virtual ~InitiateUploadNewFileRequest();
409 408
410 protected: 409 protected:
411 // UrlFetchRequestBase overrides. 410 // UrlFetchRequestBase overrides.
412 virtual GURL GetURL() const OVERRIDE; 411 virtual GURL GetURL() const OVERRIDE;
413 virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE; 412 virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE;
(...skipping 18 matching lines...) Expand all
432 // |upload_url| should be the upload_url() of the file 431 // |upload_url| should be the upload_url() of the file
433 // (resumable-create-media URL) 432 // (resumable-create-media URL)
434 // |etag| should be set if it is available to detect the upload confliction. 433 // |etag| should be set if it is available to detect the upload confliction.
435 // See also the comments of InitiateUploadRequestBase for more details 434 // See also the comments of InitiateUploadRequestBase for more details
436 // about the other parameters. 435 // about the other parameters.
437 InitiateUploadExistingFileRequest( 436 InitiateUploadExistingFileRequest(
438 RequestSender* runner, 437 RequestSender* runner,
439 net::URLRequestContextGetter* url_request_context_getter, 438 net::URLRequestContextGetter* url_request_context_getter,
440 const GDataWapiUrlGenerator& url_generator, 439 const GDataWapiUrlGenerator& url_generator,
441 const InitiateUploadCallback& callback, 440 const InitiateUploadCallback& callback,
442 const base::FilePath& drive_file_path,
443 const std::string& content_type, 441 const std::string& content_type,
444 int64 content_length, 442 int64 content_length,
445 const std::string& resource_id, 443 const std::string& resource_id,
446 const std::string& etag); 444 const std::string& etag);
447 virtual ~InitiateUploadExistingFileRequest(); 445 virtual ~InitiateUploadExistingFileRequest();
448 446
449 protected: 447 protected:
450 // UrlFetchRequestBase overrides. 448 // UrlFetchRequestBase overrides.
451 virtual GURL GetURL() const OVERRIDE; 449 virtual GURL GetURL() const OVERRIDE;
452 virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE; 450 virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE;
(...skipping 14 matching lines...) Expand all
467 // Performs the request for resuming the upload of a file. 465 // Performs the request for resuming the upload of a file.
468 class ResumeUploadRequest : public ResumeUploadRequestBase { 466 class ResumeUploadRequest : public ResumeUploadRequestBase {
469 public: 467 public:
470 // See also ResumeUploadRequestBase's comment for parameters meaining. 468 // See also ResumeUploadRequestBase's comment for parameters meaining.
471 // |callback| must not be null. 469 // |callback| must not be null.
472 ResumeUploadRequest( 470 ResumeUploadRequest(
473 RequestSender* runner, 471 RequestSender* runner,
474 net::URLRequestContextGetter* url_request_context_getter, 472 net::URLRequestContextGetter* url_request_context_getter,
475 const UploadRangeCallback& callback, 473 const UploadRangeCallback& callback,
476 const ProgressCallback& progress_callback, 474 const ProgressCallback& progress_callback,
477 const base::FilePath& drive_file_path,
478 const GURL& upload_location, 475 const GURL& upload_location,
479 int64 start_position, 476 int64 start_position,
480 int64 end_position, 477 int64 end_position,
481 int64 content_length, 478 int64 content_length,
482 const std::string& content_type, 479 const std::string& content_type,
483 const base::FilePath& local_file_path); 480 const base::FilePath& local_file_path);
484 virtual ~ResumeUploadRequest(); 481 virtual ~ResumeUploadRequest();
485 482
486 protected: 483 protected:
487 // UploadRangeRequestBase overrides. 484 // UploadRangeRequestBase overrides.
(...skipping 15 matching lines...) Expand all
503 500
504 // Performs the request to request the current upload status of a file. 501 // Performs the request to request the current upload status of a file.
505 class GetUploadStatusRequest : public GetUploadStatusRequestBase { 502 class GetUploadStatusRequest : public GetUploadStatusRequestBase {
506 public: 503 public:
507 // See also GetUploadStatusRequestBase's comment for parameters meaning. 504 // See also GetUploadStatusRequestBase's comment for parameters meaning.
508 // |callback| must not be null. 505 // |callback| must not be null.
509 GetUploadStatusRequest( 506 GetUploadStatusRequest(
510 RequestSender* runner, 507 RequestSender* runner,
511 net::URLRequestContextGetter* url_request_context_getter, 508 net::URLRequestContextGetter* url_request_context_getter,
512 const UploadRangeCallback& callback, 509 const UploadRangeCallback& callback,
513 const base::FilePath& drive_file_path,
514 const GURL& upload_url, 510 const GURL& upload_url,
515 int64 content_length); 511 int64 content_length);
516 virtual ~GetUploadStatusRequest(); 512 virtual ~GetUploadStatusRequest();
517 513
518 protected: 514 protected:
519 // UploadRangeRequestBase overrides. 515 // UploadRangeRequestBase overrides.
520 virtual void OnRangeRequestComplete( 516 virtual void OnRangeRequestComplete(
521 const UploadRangeResponse& response, 517 const UploadRangeResponse& response,
522 scoped_ptr<base::Value> value) OVERRIDE; 518 scoped_ptr<base::Value> value) OVERRIDE;
523 519
524 private: 520 private:
525 const UploadRangeCallback callback_; 521 const UploadRangeCallback callback_;
526 522
527 DISALLOW_COPY_AND_ASSIGN(GetUploadStatusRequest); 523 DISALLOW_COPY_AND_ASSIGN(GetUploadStatusRequest);
528 }; 524 };
529 525
530 } // namespace google_apis 526 } // namespace google_apis
531 527
532 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_REQUESTS_H_ 528 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_REQUESTS_H_
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/drive_api_requests_unittest.cc ('k') | chrome/browser/google_apis/gdata_wapi_requests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698