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

Side by Side Diff: chrome/browser/drive/drive_api_service.cc

Issue 1042803002: Drive: Move inner structures of DriveAPIService under drive namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 5 years, 8 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
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 #include "chrome/browser/drive/drive_api_service.h" 5 #include "chrome/browser/drive/drive_api_service.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 content_length, 632 content_length,
633 callback)); 633 callback));
634 } 634 }
635 635
636 CancelCallback DriveAPIService::MultipartUploadNewFile( 636 CancelCallback DriveAPIService::MultipartUploadNewFile(
637 const std::string& content_type, 637 const std::string& content_type,
638 int64 content_length, 638 int64 content_length,
639 const std::string& parent_resource_id, 639 const std::string& parent_resource_id,
640 const std::string& title, 640 const std::string& title,
641 const base::FilePath& local_file_path, 641 const base::FilePath& local_file_path,
642 const UploadNewFileOptions& options, 642 const drive::UploadNewFileOptions& options,
643 const FileResourceCallback& callback, 643 const FileResourceCallback& callback,
644 const google_apis::ProgressCallback& progress_callback) { 644 const google_apis::ProgressCallback& progress_callback) {
645 DCHECK(thread_checker_.CalledOnValidThread()); 645 DCHECK(thread_checker_.CalledOnValidThread());
646 DCHECK(!callback.is_null()); 646 DCHECK(!callback.is_null());
647 647
648 return sender_->StartRequestWithRetry( 648 return sender_->StartRequestWithRetry(
649 new google_apis::drive::MultipartUploadNewFileRequest( 649 new google_apis::drive::MultipartUploadNewFileRequest(
650 sender_.get(), title, parent_resource_id, content_type, 650 sender_.get(), title, parent_resource_id, content_type,
651 content_length, options.modified_date, options.last_viewed_by_me_date, 651 content_length, options.modified_date, options.last_viewed_by_me_date,
652 local_file_path, options.properties, url_generator_, callback, 652 local_file_path, options.properties, url_generator_, callback,
653 progress_callback)); 653 progress_callback));
654 } 654 }
655 655
656 CancelCallback DriveAPIService::MultipartUploadExistingFile( 656 CancelCallback DriveAPIService::MultipartUploadExistingFile(
657 const std::string& content_type, 657 const std::string& content_type,
658 int64 content_length, 658 int64 content_length,
659 const std::string& resource_id, 659 const std::string& resource_id,
660 const base::FilePath& local_file_path, 660 const base::FilePath& local_file_path,
661 const UploadExistingFileOptions& options, 661 const drive::UploadExistingFileOptions& options,
662 const FileResourceCallback& callback, 662 const FileResourceCallback& callback,
663 const google_apis::ProgressCallback& progress_callback) { 663 const google_apis::ProgressCallback& progress_callback) {
664 DCHECK(thread_checker_.CalledOnValidThread()); 664 DCHECK(thread_checker_.CalledOnValidThread());
665 DCHECK(!callback.is_null()); 665 DCHECK(!callback.is_null());
666 666
667 return sender_->StartRequestWithRetry( 667 return sender_->StartRequestWithRetry(
668 new google_apis::drive::MultipartUploadExistingFileRequest( 668 new google_apis::drive::MultipartUploadExistingFileRequest(
669 sender_.get(), options.title, resource_id, options.parent_resource_id, 669 sender_.get(), options.title, resource_id, options.parent_resource_id,
670 content_type, content_length, options.modified_date, 670 content_type, content_length, options.modified_date,
671 options.last_viewed_by_me_date, local_file_path, options.etag, 671 options.last_viewed_by_me_date, local_file_path, options.etag,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 if (CanSendRequest()) { 774 if (CanSendRequest()) {
775 FOR_EACH_OBSERVER( 775 FOR_EACH_OBSERVER(
776 DriveServiceObserver, observers_, OnReadyToSendRequests()); 776 DriveServiceObserver, observers_, OnReadyToSendRequests());
777 } else if (!HasRefreshToken()) { 777 } else if (!HasRefreshToken()) {
778 FOR_EACH_OBSERVER( 778 FOR_EACH_OBSERVER(
779 DriveServiceObserver, observers_, OnRefreshTokenInvalid()); 779 DriveServiceObserver, observers_, OnRefreshTokenInvalid());
780 } 780 }
781 } 781 }
782 782
783 } // namespace drive 783 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/drive/drive_api_service.h ('k') | chrome/browser/drive/drive_service_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698