diff options
-rw-r--r-- | chrome/browser/google_apis/drive_api_service.cc | 15 | ||||
-rw-r--r-- | chrome/browser/google_apis/drive_api_service.h | 8 | ||||
-rw-r--r-- | chrome/browser/google_apis/drive_service_interface.h | 13 | ||||
-rw-r--r-- | chrome/browser/google_apis/drive_uploader.cc | 6 | ||||
-rw-r--r-- | chrome/browser/google_apis/drive_uploader.h | 6 | ||||
-rw-r--r-- | chrome/browser/google_apis/drive_uploader_unittest.cc | 14 | ||||
-rw-r--r-- | chrome/browser/google_apis/dummy_drive_service.cc | 9 | ||||
-rw-r--r-- | chrome/browser/google_apis/dummy_drive_service.h | 8 | ||||
-rw-r--r-- | chrome/browser/google_apis/fake_drive_service.cc | 12 | ||||
-rw-r--r-- | chrome/browser/google_apis/fake_drive_service.h | 8 | ||||
-rw-r--r-- | chrome/browser/google_apis/gdata_wapi_operations.cc | 23 | ||||
-rw-r--r-- | chrome/browser/google_apis/gdata_wapi_operations.h | 26 | ||||
-rw-r--r-- | chrome/browser/google_apis/gdata_wapi_operations_unittest.cc | 26 | ||||
-rw-r--r-- | chrome/browser/google_apis/gdata_wapi_service.cc | 15 | ||||
-rw-r--r-- | chrome/browser/google_apis/gdata_wapi_service.h | 8 | ||||
-rw-r--r-- | chrome/browser/google_apis/mock_drive_service.h | 8 |
16 files changed, 144 insertions, 61 deletions
diff --git a/chrome/browser/google_apis/drive_api_service.cc b/chrome/browser/google_apis/drive_api_service.cc index 3c7aef5..d16027e 100644 --- a/chrome/browser/google_apis/drive_api_service.cc +++ b/chrome/browser/google_apis/drive_api_service.cc @@ -458,7 +458,7 @@ void DriveAPIService::InitiateUpload( void DriveAPIService::ResumeUpload( const ResumeUploadParams& params, - const ResumeUploadCallback& callback) { + const UploadRangeCallback& callback) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(!callback.is_null()); @@ -466,6 +466,19 @@ void DriveAPIService::ResumeUpload( NOTREACHED(); } +void DriveAPIService::GetUploadStatus( + UploadMode upload_mode, + const FilePath& drive_file_path, + const GURL& upload_url, + int64 content_length, + const UploadRangeCallback& callback) { + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK(!callback.is_null()); + + // TODO(hidehiko): Implement this. + NOTREACHED(); +} + void DriveAPIService::AuthorizeApp( const GURL& edit_url, const std::string& app_ids, diff --git a/chrome/browser/google_apis/drive_api_service.h b/chrome/browser/google_apis/drive_api_service.h index 49b0b37..08960dc 100644 --- a/chrome/browser/google_apis/drive_api_service.h +++ b/chrome/browser/google_apis/drive_api_service.h @@ -110,7 +110,13 @@ class DriveAPIService : public DriveServiceInterface, const InitiateUploadCallback& callback) OVERRIDE; virtual void ResumeUpload( const ResumeUploadParams& params, - const ResumeUploadCallback& callback) OVERRIDE; + const UploadRangeCallback& callback) OVERRIDE; + virtual void GetUploadStatus( + UploadMode upload_mode, + const FilePath& drive_file_path, + const GURL& upload_url, + int64 content_length, + const UploadRangeCallback& callback) OVERRIDE; virtual void AuthorizeApp( const GURL& edit_url, const std::string& app_id, diff --git a/chrome/browser/google_apis/drive_service_interface.h b/chrome/browser/google_apis/drive_service_interface.h index 05f7712..1d07a3f 100644 --- a/chrome/browser/google_apis/drive_service_interface.h +++ b/chrome/browser/google_apis/drive_service_interface.h @@ -240,7 +240,18 @@ class DriveServiceInterface { // Resumes uploading of a document/file on the calling thread. // |callback| must not be null. virtual void ResumeUpload(const ResumeUploadParams& params, - const ResumeUploadCallback& callback) = 0; + const UploadRangeCallback& callback) = 0; + + // Gets the current status of the uploading to |upload_url| from the server. + // |upload_mode|, |drive_file_path| and |content_length| should be set to + // the same value which is used for ResumeUpload. + // |callback| must not be null. + virtual void GetUploadStatus( + UploadMode upload_mode, + const FilePath& drive_file_path, + const GURL& upload_url, + int64 content_length, + const UploadRangeCallback& callback) = 0; // Authorizes a Drive app with the id |app_id| to open the given file. // Upon completion, invokes |callback| with the link to open the file with diff --git a/chrome/browser/google_apis/drive_uploader.cc b/chrome/browser/google_apis/drive_uploader.cc index 24620b0..9be960f 100644 --- a/chrome/browser/google_apis/drive_uploader.cc +++ b/chrome/browser/google_apis/drive_uploader.cc @@ -343,14 +343,14 @@ void DriveUploader::ReadCompletionCallback( info_ptr->buf, info_ptr->upload_location, info_ptr->drive_path), - base::Bind(&DriveUploader::OnResumeUploadResponseReceived, + base::Bind(&DriveUploader::OnUploadRangeResponseReceived, weak_ptr_factory_.GetWeakPtr(), base::Passed(&upload_file_info))); } -void DriveUploader::OnResumeUploadResponseReceived( +void DriveUploader::OnUploadRangeResponseReceived( scoped_ptr<UploadFileInfo> upload_file_info, - const ResumeUploadResponse& response, + const UploadRangeResponse& response, scoped_ptr<ResourceEntry> entry) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); diff --git a/chrome/browser/google_apis/drive_uploader.h b/chrome/browser/google_apis/drive_uploader.h index 4dc496b..c18f2a83 100644 --- a/chrome/browser/google_apis/drive_uploader.h +++ b/chrome/browser/google_apis/drive_uploader.h @@ -23,7 +23,7 @@ class FilePath; namespace google_apis { class DriveServiceInterface; -struct ResumeUploadResponse; +struct UploadRangeResponse; // Callback to be invoked once the upload has completed. typedef base::Callback<void(DriveUploadError error, @@ -129,9 +129,9 @@ class DriveUploader : public DriveUploaderInterface { int bytes_to_send); // DriveService callback for ResumeUpload. - void OnResumeUploadResponseReceived( + void OnUploadRangeResponseReceived( scoped_ptr<UploadFileInfo> upload_file_info, - const ResumeUploadResponse& response, + const UploadRangeResponse& response, scoped_ptr<ResourceEntry> entry); // Handle failed uploads. diff --git a/chrome/browser/google_apis/drive_uploader_unittest.cc b/chrome/browser/google_apis/drive_uploader_unittest.cc index 03e6328..38aafed 100644 --- a/chrome/browser/google_apis/drive_uploader_unittest.cc +++ b/chrome/browser/google_apis/drive_uploader_unittest.cc @@ -94,7 +94,7 @@ class MockDriveServiceWithUploadExpectation : public DummyDriveService { // Handles a request for uploading a chunk of bytes. virtual void ResumeUpload(const ResumeUploadParams& params, - const ResumeUploadCallback& callback) OVERRIDE { + const UploadRangeCallback& callback) OVERRIDE { const int64 expected_size = expected_upload_content_.size(); // The upload range should start from the current first unreceived byte. @@ -125,10 +125,10 @@ class MockDriveServiceWithUploadExpectation : public DummyDriveService { received_bytes_ = params.end_position; // Callback with response. - ResumeUploadResponse response; + UploadRangeResponse response; scoped_ptr<ResourceEntry> entry; if (received_bytes_ == params.content_length) { - response = ResumeUploadResponse( + response = UploadRangeResponse( params.upload_mode == UPLOAD_NEW_FILE ? HTTP_CREATED : HTTP_SUCCESS, -1, -1); @@ -136,7 +136,7 @@ class MockDriveServiceWithUploadExpectation : public DummyDriveService { dict.Set("id.$t", new base::StringValue(kTestDummyId)); entry = ResourceEntry::CreateFrom(dict); } else { - response = ResumeUploadResponse(HTTP_RESUME_INCOMPLETE, 0, + response = UploadRangeResponse(HTTP_RESUME_INCOMPLETE, 0, params.end_position); } // ResumeUpload is an asynchronous function, so don't callback directly. @@ -160,7 +160,7 @@ class MockDriveServiceNoConnectionAtInitiate : public DummyDriveService { // Should not be used. virtual void ResumeUpload(const ResumeUploadParams& params, - const ResumeUploadCallback& callback) OVERRIDE { + const UploadRangeCallback& callback) OVERRIDE { NOTREACHED(); } }; @@ -176,10 +176,10 @@ class MockDriveServiceNoConnectionAtResume : public DummyDriveService { // Returns error. virtual void ResumeUpload(const ResumeUploadParams& params, - const ResumeUploadCallback& callback) OVERRIDE { + const UploadRangeCallback& callback) OVERRIDE { MessageLoop::current()->PostTask(FROM_HERE, base::Bind(callback, - ResumeUploadResponse(GDATA_NO_CONNECTION, -1, -1), + UploadRangeResponse(GDATA_NO_CONNECTION, -1, -1), base::Passed(scoped_ptr<ResourceEntry>()))); } }; diff --git a/chrome/browser/google_apis/dummy_drive_service.cc b/chrome/browser/google_apis/dummy_drive_service.cc index 7c832f8..929d1e5 100644 --- a/chrome/browser/google_apis/dummy_drive_service.cc +++ b/chrome/browser/google_apis/dummy_drive_service.cc @@ -97,7 +97,14 @@ void DummyDriveService::InitiateUpload(const InitiateUploadParams& params, } void DummyDriveService::ResumeUpload(const ResumeUploadParams& params, - const ResumeUploadCallback& callback) {} + const UploadRangeCallback& callback) {} + +void DummyDriveService::GetUploadStatus( + UploadMode upload_mode, + const FilePath& drive_file_path, + const GURL& upload_url, + int64 content_length, + const UploadRangeCallback& callback) {} void DummyDriveService::AuthorizeApp(const GURL& edit_url, const std::string& app_id, diff --git a/chrome/browser/google_apis/dummy_drive_service.h b/chrome/browser/google_apis/dummy_drive_service.h index 8f2b8d0..a5c3fb8 100644 --- a/chrome/browser/google_apis/dummy_drive_service.h +++ b/chrome/browser/google_apis/dummy_drive_service.h @@ -73,7 +73,13 @@ class DummyDriveService : public DriveServiceInterface { virtual void InitiateUpload(const InitiateUploadParams& params, const InitiateUploadCallback& callback) OVERRIDE; virtual void ResumeUpload(const ResumeUploadParams& params, - const ResumeUploadCallback& callback) OVERRIDE; + const UploadRangeCallback& callback) OVERRIDE; + virtual void GetUploadStatus( + UploadMode upload_mode, + const FilePath& drive_file_path, + const GURL& upload_url, + int64 content_length, + const UploadRangeCallback& callback) OVERRIDE; virtual void AuthorizeApp(const GURL& edit_url, const std::string& app_id, const AuthorizeAppCallback& callback) OVERRIDE; diff --git a/chrome/browser/google_apis/fake_drive_service.cc b/chrome/browser/google_apis/fake_drive_service.cc index 8f9bc9e..60b4888 100644 --- a/chrome/browser/google_apis/fake_drive_service.cc +++ b/chrome/browser/google_apis/fake_drive_service.cc @@ -778,7 +778,17 @@ void FakeDriveService::InitiateUpload( } void FakeDriveService::ResumeUpload(const ResumeUploadParams& params, - const ResumeUploadCallback& callback) { + const UploadRangeCallback& callback) { + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK(!callback.is_null()); +} + +void FakeDriveService::GetUploadStatus( + UploadMode upload_mode, + const FilePath& drive_file_path, + const GURL& upload_url, + int64 content_length, + const UploadRangeCallback& callback) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(!callback.is_null()); } diff --git a/chrome/browser/google_apis/fake_drive_service.h b/chrome/browser/google_apis/fake_drive_service.h index c96a326..66f2595 100644 --- a/chrome/browser/google_apis/fake_drive_service.h +++ b/chrome/browser/google_apis/fake_drive_service.h @@ -122,7 +122,13 @@ class FakeDriveService : public DriveServiceInterface { virtual void InitiateUpload(const InitiateUploadParams& params, const InitiateUploadCallback& callback) OVERRIDE; virtual void ResumeUpload(const ResumeUploadParams& params, - const ResumeUploadCallback& callback) OVERRIDE; + const UploadRangeCallback& callback) OVERRIDE; + virtual void GetUploadStatus( + UploadMode upload_mode, + const FilePath& drive_file_path, + const GURL& upload_url, + int64 content_length, + const UploadRangeCallback& callback) OVERRIDE; virtual void AuthorizeApp(const GURL& edit_url, const std::string& app_id, const AuthorizeAppCallback& callback) OVERRIDE; diff --git a/chrome/browser/google_apis/gdata_wapi_operations.cc b/chrome/browser/google_apis/gdata_wapi_operations.cc index 8ba5b21..f241a9a 100644 --- a/chrome/browser/google_apis/gdata_wapi_operations.cc +++ b/chrome/browser/google_apis/gdata_wapi_operations.cc @@ -44,21 +44,21 @@ namespace google_apis { //============================ Structs =========================== -ResumeUploadResponse::ResumeUploadResponse() +UploadRangeResponse::UploadRangeResponse() : code(HTTP_SUCCESS), start_position_received(0), end_position_received(0) { } -ResumeUploadResponse::ResumeUploadResponse(GDataErrorCode code, - int64 start_position_received, - int64 end_position_received) +UploadRangeResponse::UploadRangeResponse(GDataErrorCode code, + int64 start_position_received, + int64 end_position_received) : code(code), start_position_received(start_position_received), end_position_received(end_position_received) { } -ResumeUploadResponse::~ResumeUploadResponse() { +UploadRangeResponse::~UploadRangeResponse() { } InitiateUploadParams::InitiateUploadParams( @@ -605,7 +605,7 @@ bool InitiateUploadOperation::GetContentData(std::string* upload_content_type, ResumeUploadOperation::ResumeUploadOperation( OperationRegistry* registry, net::URLRequestContextGetter* url_request_context_getter, - const ResumeUploadCallback& callback, + const UploadRangeCallback& callback, const ResumeUploadParams& params) : UrlFetchOperationBase(registry, url_request_context_getter, @@ -655,9 +655,9 @@ void ResumeUploadOperation::ProcessURLFetchResults(const URLFetcher* source) { << "], range_parsed=" << start_position_received << "," << end_position_received; - callback_.Run(ResumeUploadResponse(code, - start_position_received, - end_position_received), + callback_.Run(UploadRangeResponse(code, + start_position_received, + end_position_received), scoped_ptr<ResourceEntry>()); OnProcessURLFetchResultsComplete(true); @@ -694,7 +694,7 @@ void ResumeUploadOperation::OnDataParsed(GDataErrorCode code, if (!entry.get()) LOG(WARNING) << "Invalid entry received on upload."; - callback_.Run(ResumeUploadResponse(code, -1, -1), entry.Pass()); + callback_.Run(UploadRangeResponse(code, -1, -1), entry.Pass()); OnProcessURLFetchResultsComplete(last_chunk_completed_); } @@ -710,8 +710,7 @@ void ResumeUploadOperation::NotifySuccessToOperationRegistry() { } void ResumeUploadOperation::RunCallbackOnPrematureFailure(GDataErrorCode code) { - scoped_ptr<ResourceEntry> entry; - callback_.Run(ResumeUploadResponse(code, 0, 0), entry.Pass()); + callback_.Run(UploadRangeResponse(code, 0, 0), scoped_ptr<ResourceEntry>()); } URLFetcher::RequestType ResumeUploadOperation::GetRequestType() const { diff --git a/chrome/browser/google_apis/gdata_wapi_operations.h b/chrome/browser/google_apis/gdata_wapi_operations.h index edb36b6..abd600d 100644 --- a/chrome/browser/google_apis/gdata_wapi_operations.h +++ b/chrome/browser/google_apis/gdata_wapi_operations.h @@ -428,14 +428,13 @@ class InitiateUploadOperation : public UrlFetchOperationBase { //============================ ResumeUploadOperation =========================== -// Struct for response to ResumeUpload. -// TODO(satorux): Should return the next upload URL. crbug.com/163555 -struct ResumeUploadResponse { - ResumeUploadResponse(); - ResumeUploadResponse(GDataErrorCode code, - int64 start_position_received, - int64 end_position_received); - ~ResumeUploadResponse(); +// Struct for response to ResumeUpload and GetUploadStatus. +struct UploadRangeResponse { + UploadRangeResponse(); + UploadRangeResponse(GDataErrorCode code, + int64 start_position_received, + int64 end_position_received); + ~UploadRangeResponse(); GDataErrorCode code; // The values of "Range" header returned from the server. The values are @@ -476,10 +475,11 @@ struct ResumeUploadParams { const FilePath drive_file_path; }; -// Callback type for DocumentServiceInterface::ResumeUpload. +// Callback type for DocumentServiceInterface::ResumeUpload and +// DocumentServiceInterface::GetUploadStatus. typedef base::Callback<void( - const ResumeUploadResponse& response, - scoped_ptr<ResourceEntry> new_entry)> ResumeUploadCallback; + const UploadRangeResponse& response, + scoped_ptr<ResourceEntry> new_entry)> UploadRangeCallback; // This class performs the operation for resuming the upload of a file. // More specifically, this operation uploads a chunk of data carried in |buf| @@ -498,7 +498,7 @@ class ResumeUploadOperation : public UrlFetchOperationBase { ResumeUploadOperation( OperationRegistry* registry, net::URLRequestContextGetter* url_request_context_getter, - const ResumeUploadCallback& callback, + const UploadRangeCallback& callback, const ResumeUploadParams& params); virtual ~ResumeUploadOperation(); @@ -522,7 +522,7 @@ class ResumeUploadOperation : public UrlFetchOperationBase { // Called when ParseJson() is completed. void OnDataParsed(GDataErrorCode code, scoped_ptr<base::Value> value); - const ResumeUploadCallback callback_; + const UploadRangeCallback callback_; const ResumeUploadParams params_; bool last_chunk_completed_; diff --git a/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc b/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc index e9dc6b3..26397d9 100644 --- a/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc +++ b/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc @@ -47,10 +47,10 @@ void CopyResultFromInitiateUploadCallbackAndQuit( } // Copies the result from ResumeUploadCallback and quit the message loop. -void CopyResultFromResumeUploadCallbackAndQuit( - ResumeUploadResponse* out_response, +void CopyResultFromUploadRangeCallbackAndQuit( + UploadRangeResponse* out_response, scoped_ptr<ResourceEntry>* out_new_entry, - const ResumeUploadResponse& response, + const UploadRangeResponse& response, scoped_ptr<ResourceEntry> new_entry) { *out_response = response; *out_new_entry = new_entry.Pass(); @@ -828,13 +828,13 @@ TEST_F(GDataWapiOperationsTest, UploadNewFile) { upload_url, FilePath::FromUTF8Unsafe("drive/newfile.txt")); - ResumeUploadResponse response; + UploadRangeResponse response; scoped_ptr<ResourceEntry> new_entry; ResumeUploadOperation* resume_operation = new ResumeUploadOperation( &operation_registry_, request_context_getter_.get(), - base::Bind(&CopyResultFromResumeUploadCallbackAndQuit, + base::Bind(&CopyResultFromUploadRangeCallbackAndQuit, &response, &new_entry), resume_params); @@ -943,13 +943,13 @@ TEST_F(GDataWapiOperationsTest, UploadNewLargeFile) { upload_url, FilePath::FromUTF8Unsafe("drive/newfile.txt")); - ResumeUploadResponse response; + UploadRangeResponse response; scoped_ptr<ResourceEntry> new_entry; ResumeUploadOperation* resume_operation = new ResumeUploadOperation( &operation_registry_, request_context_getter_.get(), - base::Bind(&CopyResultFromResumeUploadCallbackAndQuit, + base::Bind(&CopyResultFromUploadRangeCallbackAndQuit, &response, &new_entry), resume_params); @@ -1057,13 +1057,13 @@ TEST_F(GDataWapiOperationsTest, UploadNewEmptyFile) { upload_url, FilePath::FromUTF8Unsafe("drive/newfile.txt")); - ResumeUploadResponse response; + UploadRangeResponse response; scoped_ptr<ResourceEntry> new_entry; ResumeUploadOperation* resume_operation = new ResumeUploadOperation( &operation_registry_, request_context_getter_.get(), - base::Bind(&CopyResultFromResumeUploadCallbackAndQuit, + base::Bind(&CopyResultFromUploadRangeCallbackAndQuit, &response, &new_entry), resume_params); @@ -1154,13 +1154,13 @@ TEST_F(GDataWapiOperationsTest, UploadExistingFile) { upload_url, FilePath::FromUTF8Unsafe("drive/existingfile.txt")); - ResumeUploadResponse response; + UploadRangeResponse response; scoped_ptr<ResourceEntry> new_entry; ResumeUploadOperation* resume_operation = new ResumeUploadOperation( &operation_registry_, request_context_getter_.get(), - base::Bind(&CopyResultFromResumeUploadCallbackAndQuit, + base::Bind(&CopyResultFromUploadRangeCallbackAndQuit, &response, &new_entry), resume_params); @@ -1253,13 +1253,13 @@ TEST_F(GDataWapiOperationsTest, UploadExistingFileWithETag) { upload_url, FilePath::FromUTF8Unsafe("drive/existingfile.txt")); - ResumeUploadResponse response; + UploadRangeResponse response; scoped_ptr<ResourceEntry> new_entry; ResumeUploadOperation* resume_operation = new ResumeUploadOperation( &operation_registry_, request_context_getter_.get(), - base::Bind(&CopyResultFromResumeUploadCallbackAndQuit, + base::Bind(&CopyResultFromUploadRangeCallbackAndQuit, &response, &new_entry), resume_params); diff --git a/chrome/browser/google_apis/gdata_wapi_service.cc b/chrome/browser/google_apis/gdata_wapi_service.cc index e3622f3..d40515c 100644 --- a/chrome/browser/google_apis/gdata_wapi_service.cc +++ b/chrome/browser/google_apis/gdata_wapi_service.cc @@ -427,7 +427,7 @@ void GDataWapiService::InitiateUpload( } void GDataWapiService::ResumeUpload(const ResumeUploadParams& params, - const ResumeUploadCallback& callback) { + const UploadRangeCallback& callback) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(!callback.is_null()); @@ -438,6 +438,19 @@ void GDataWapiService::ResumeUpload(const ResumeUploadParams& params, params)); } +void GDataWapiService::GetUploadStatus( + UploadMode upload_mode, + const FilePath& drive_file_path, + const GURL& upload_url, + int64 content_length, + const UploadRangeCallback& callback) { + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK(!callback.is_null()); + + // TODO(hidehiko): Implement this. + NOTREACHED(); +} + void GDataWapiService::AuthorizeApp(const GURL& edit_url, const std::string& app_id, const AuthorizeAppCallback& callback) { diff --git a/chrome/browser/google_apis/gdata_wapi_service.h b/chrome/browser/google_apis/gdata_wapi_service.h index 7ec94c5..3f0137d 100644 --- a/chrome/browser/google_apis/gdata_wapi_service.h +++ b/chrome/browser/google_apis/gdata_wapi_service.h @@ -112,7 +112,13 @@ class GDataWapiService : public DriveServiceInterface, const InitiateUploadCallback& callback) OVERRIDE; virtual void ResumeUpload( const ResumeUploadParams& params, - const ResumeUploadCallback& callback) OVERRIDE; + const UploadRangeCallback& callback) OVERRIDE; + virtual void GetUploadStatus( + UploadMode upload_mode, + const FilePath& drive_file_path, + const GURL& upload_url, + int64 content_length, + const UploadRangeCallback& callback) OVERRIDE; virtual void AuthorizeApp( const GURL& edit_url, const std::string& app_id, diff --git a/chrome/browser/google_apis/mock_drive_service.h b/chrome/browser/google_apis/mock_drive_service.h index 86d666b..ca12dfa 100644 --- a/chrome/browser/google_apis/mock_drive_service.h +++ b/chrome/browser/google_apis/mock_drive_service.h @@ -85,7 +85,13 @@ class MockDriveService : public DriveServiceInterface { const InitiateUploadCallback& callback)); MOCK_METHOD2(ResumeUpload, void(const ResumeUploadParams& upload_file_info, - const ResumeUploadCallback& callback)); + const UploadRangeCallback& callback)); + MOCK_METHOD5(GetUploadStatus, + void(UploadMode upload_mode, + const FilePath& drive_file_path, + const GURL& upload_url, + int64 content_length, + const UploadRangeCallback& callback)); MOCK_METHOD3(AuthorizeApp, void(const GURL& edit_url, const std::string& app_id, |