diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-27 07:16:53 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-27 07:16:53 +0000 |
commit | e146f33eb3bda0089676a47d9538cb8a75796a46 (patch) | |
tree | b86d9048309a5ec248781da173bd4fb4bf5141ee | |
parent | 5ca20f274249eb76e4699fa08783c297a383ee66 (diff) | |
download | chromium_src-e146f33eb3bda0089676a47d9538cb8a75796a46.zip chromium_src-e146f33eb3bda0089676a47d9538cb8a75796a46.tar.gz chromium_src-e146f33eb3bda0089676a47d9538cb8a75796a46.tar.bz2 |
google_apis: Remove an unused parameter from EntryActionCallback
BUG=146900
TEST=none
Review URL: https://codereview.chromium.org/11421092
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169601 0039d316-1c4b-4281-b951-d872f2087c98
12 files changed, 21 insertions, 32 deletions
diff --git a/chrome/browser/chromeos/drive/file_system/copy_operation.cc b/chrome/browser/chromeos/drive/file_system/copy_operation.cc index bfb3866..2f51f0d 100644 --- a/chrome/browser/chromeos/drive/file_system/copy_operation.cc +++ b/chrome/browser/chromeos/drive/file_system/copy_operation.cc @@ -327,8 +327,7 @@ void CopyOperation::MoveEntryToDirectory( const FilePath& file_path, const FilePath& directory_path, const FileMoveCallback& callback, - GDataErrorCode status, - const GURL& /* document_url */) { + GDataErrorCode status) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(!callback.is_null()); diff --git a/chrome/browser/chromeos/drive/file_system/copy_operation.h b/chrome/browser/chromeos/drive/file_system/copy_operation.h index 83f4ff1..4cea2fe 100644 --- a/chrome/browser/chromeos/drive/file_system/copy_operation.h +++ b/chrome/browser/chromeos/drive/file_system/copy_operation.h @@ -143,8 +143,7 @@ class CopyOperation { void MoveEntryToDirectory(const FilePath& file_path, const FilePath& directory_path, const FileMoveCallback& callback, - google_apis::GDataErrorCode status, - const GURL& /* document_url */); + google_apis::GDataErrorCode status); // Callback when an entry is moved to another directory on the client side. // Notifies the directory change and runs |callback|. diff --git a/chrome/browser/chromeos/drive/file_system/move_operation.cc b/chrome/browser/chromeos/drive/file_system/move_operation.cc index 307596ba..ce45c67 100644 --- a/chrome/browser/chromeos/drive/file_system/move_operation.cc +++ b/chrome/browser/chromeos/drive/file_system/move_operation.cc @@ -186,8 +186,7 @@ void MoveOperation::RenameEntryLocally( const FilePath& file_path, const FilePath::StringType& new_name, const FileMoveCallback& callback, - google_apis::GDataErrorCode status, - const GURL& /* document_url */) { + google_apis::GDataErrorCode status) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(!callback.is_null()); @@ -338,8 +337,7 @@ void MoveOperation::MoveEntryToDirectory( const FilePath& file_path, const FilePath& directory_path, const FileMoveCallback& callback, - google_apis::GDataErrorCode status, - const GURL& /* document_url */) { + google_apis::GDataErrorCode status) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(!callback.is_null()); diff --git a/chrome/browser/chromeos/drive/file_system/move_operation.h b/chrome/browser/chromeos/drive/file_system/move_operation.h index eee2355..9f8f010 100644 --- a/chrome/browser/chromeos/drive/file_system/move_operation.h +++ b/chrome/browser/chromeos/drive/file_system/move_operation.h @@ -84,8 +84,7 @@ class MoveOperation { void RenameEntryLocally(const FilePath& file_path, const FilePath::StringType& new_name, const FileMoveCallback& callback, - google_apis::GDataErrorCode status, - const GURL& document_url); + google_apis::GDataErrorCode status); // Removes a file or directory at |file_path| from the current directory if // it's not in the root directory. This essentially moves an entry to the @@ -126,8 +125,7 @@ class MoveOperation { void MoveEntryToDirectory(const FilePath& file_path, const FilePath& directory_path, const FileMoveCallback& callback, - google_apis::GDataErrorCode status, - const GURL& document_url); + google_apis::GDataErrorCode status); // Callback when an entry is moved to another directory on the client side. // Notifies the directory change and runs |callback|. diff --git a/chrome/browser/chromeos/drive/file_system/remove_operation.cc b/chrome/browser/chromeos/drive/file_system/remove_operation.cc index d079efa..86e9eb4 100644 --- a/chrome/browser/chromeos/drive/file_system/remove_operation.cc +++ b/chrome/browser/chromeos/drive/file_system/remove_operation.cc @@ -84,8 +84,7 @@ void RemoveOperation::RemoveAfterGetEntryInfo( void RemoveOperation::RemoveResourceLocally( const FileOperationCallback& callback, const std::string& resource_id, - google_apis::GDataErrorCode status, - const GURL& /* document_url */) { + google_apis::GDataErrorCode status) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(!callback.is_null()); diff --git a/chrome/browser/chromeos/drive/file_system/remove_operation.h b/chrome/browser/chromeos/drive/file_system/remove_operation.h index 54ad8c17..2d61c32 100644 --- a/chrome/browser/chromeos/drive/file_system/remove_operation.h +++ b/chrome/browser/chromeos/drive/file_system/remove_operation.h @@ -55,12 +55,11 @@ class RemoveOperation { // Callback for DriveServiceInterface::DeleteDocument. Removes the entry with // |resource_id| from the local snapshot of the filesystem and the cache. - // |document_url| is unused. |callback| must not be null. + // |callback| must not be null. void RemoveResourceLocally( const FileOperationCallback& callback, const std::string& resource_id, - google_apis::GDataErrorCode status, - const GURL& /* document_url */); + google_apis::GDataErrorCode status); // Sends notification for directory changes. Notifies of directory changes, // and runs |callback| with |error|. |callback| may be null. diff --git a/chrome/browser/google_apis/base_operations.cc b/chrome/browser/google_apis/base_operations.cc index 4ca87f6..a194f3b 100644 --- a/chrome/browser/google_apis/base_operations.cc +++ b/chrome/browser/google_apis/base_operations.cc @@ -334,7 +334,7 @@ EntryActionOperation::~EntryActionOperation() {} void EntryActionOperation::ProcessURLFetchResults(const URLFetcher* source) { if (!callback_.is_null()) { GDataErrorCode code = GetErrorCode(source); - callback_.Run(code, document_url_); + callback_.Run(code); } const bool success = true; OnProcessURLFetchResultsComplete(success); @@ -342,7 +342,7 @@ void EntryActionOperation::ProcessURLFetchResults(const URLFetcher* source) { void EntryActionOperation::RunCallbackOnPrematureFailure(GDataErrorCode code) { if (!callback_.is_null()) - callback_.Run(code, document_url_); + callback_.Run(code); } //============================== GetDataOperation ============================== diff --git a/chrome/browser/google_apis/base_operations.h b/chrome/browser/google_apis/base_operations.h index 3bb9dfc..df51866 100644 --- a/chrome/browser/google_apis/base_operations.h +++ b/chrome/browser/google_apis/base_operations.h @@ -185,8 +185,7 @@ class UrlFetchOperationBase : public AuthenticatedOperationInterface, //============================ EntryActionOperation ============================ // Callback type for Delete/Move DocumentServiceInterface calls. -typedef base::Callback<void(GDataErrorCode error, - const GURL& document_url)> EntryActionCallback; +typedef base::Callback<void(GDataErrorCode error)> EntryActionCallback; // This class performs a simple action over a given entry (document/file). // It is meant to be used for operations that return no JSON blobs. diff --git a/chrome/browser/google_apis/mock_drive_service.cc b/chrome/browser/google_apis/mock_drive_service.cc index 82b7a23..fb49c59 100644 --- a/chrome/browser/google_apis/mock_drive_service.cc +++ b/chrome/browser/google_apis/mock_drive_service.cc @@ -102,7 +102,7 @@ void MockDriveService::DeleteDocumentStub( const EntryActionCallback& callback) { base::MessageLoopProxy::current()->PostTask( FROM_HERE, - base::Bind(callback, HTTP_SUCCESS, document_url)); + base::Bind(callback, HTTP_SUCCESS)); } void MockDriveService::DownloadDocumentStub( @@ -133,7 +133,7 @@ void MockDriveService::RenameResourceStub( const EntryActionCallback& callback) { base::MessageLoopProxy::current()->PostTask( FROM_HERE, - base::Bind(callback, HTTP_SUCCESS, resource_url)); + base::Bind(callback, HTTP_SUCCESS)); } void MockDriveService::AddResourceToDirectoryStub( @@ -142,7 +142,7 @@ void MockDriveService::AddResourceToDirectoryStub( const EntryActionCallback& callback) { base::MessageLoopProxy::current()->PostTask( FROM_HERE, - base::Bind(callback, HTTP_SUCCESS, resource_url)); + base::Bind(callback, HTTP_SUCCESS)); } void MockDriveService::RemoveResourceFromDirectoryStub( @@ -152,7 +152,7 @@ void MockDriveService::RemoveResourceFromDirectoryStub( const EntryActionCallback& callback) { base::MessageLoopProxy::current()->PostTask( FROM_HERE, - base::Bind(callback, HTTP_SUCCESS, resource_url)); + base::Bind(callback, HTTP_SUCCESS)); } void MockDriveService::CreateDirectoryStub( diff --git a/chrome/browser/sync_file_system/drive_file_sync_client.cc b/chrome/browser/sync_file_system/drive_file_sync_client.cc index 33750f42..c800692 100644 --- a/chrome/browser/sync_file_system/drive_file_sync_client.cc +++ b/chrome/browser/sync_file_system/drive_file_sync_client.cc @@ -590,8 +590,7 @@ void DriveFileSyncClient::DeleteFileInternal( void DriveFileSyncClient::DidDeleteFile( const GDataErrorCallback& callback, - google_apis::GDataErrorCode error, - const GURL& document_url) { + google_apis::GDataErrorCode error) { DCHECK(CalledOnValidThread()); callback.Run(error); } diff --git a/chrome/browser/sync_file_system/drive_file_sync_client.h b/chrome/browser/sync_file_system/drive_file_sync_client.h index 7900bbe5..ff20bda 100644 --- a/chrome/browser/sync_file_system/drive_file_sync_client.h +++ b/chrome/browser/sync_file_system/drive_file_sync_client.h @@ -224,8 +224,7 @@ class DriveFileSyncClient : public base::NonThreadSafe, scoped_ptr<google_apis::DocumentEntry> entry); void DidDeleteFile(const GDataErrorCallback& callback, - google_apis::GDataErrorCode error, - const GURL& document_url); + google_apis::GDataErrorCode error); static std::string FormatTitleQuery(const std::string& title); diff --git a/chrome/browser/sync_file_system/drive_file_sync_client_unittest.cc b/chrome/browser/sync_file_system/drive_file_sync_client_unittest.cc index 7d9bf0f4..dff1905 100644 --- a/chrome/browser/sync_file_system/drive_file_sync_client_unittest.cc +++ b/chrome/browser/sync_file_system/drive_file_sync_client_unittest.cc @@ -213,10 +213,10 @@ ACTION_P3(InvokeDownloadActionCallback3, } // Invokes |arg1| as a EntryActionCallback. -ACTION_P2(InvokeEntryActionCallback2, error, document_url) { +ACTION_P(InvokeEntryActionCallback2, error) { base::MessageLoopProxy::current()->PostTask( FROM_HERE, - base::Bind(arg1, error, document_url)); + base::Bind(arg1, error)); } void DidGetResourceID(bool* done_out, @@ -797,7 +797,7 @@ TEST_F(DriveFileSyncClientTest, DeleteFile) { // DidGetDocumentEntryForDeleteFile. EXPECT_CALL(*mock_drive_service(), DeleteDocument(entry->GetLinkByType(Link::LINK_SELF)->href(), _)) - .WillOnce(InvokeEntryActionCallback2(google_apis::HTTP_SUCCESS, GURL())) + .WillOnce(InvokeEntryActionCallback2(google_apis::HTTP_SUCCESS)) .RetiresOnSaturation(); bool done = false; |