Chromium Code Reviews| Index: chrome/browser/google_apis/gdata_wapi_service.cc |
| diff --git a/chrome/browser/google_apis/gdata_wapi_service.cc b/chrome/browser/google_apis/gdata_wapi_service.cc |
| index 7dfc2870beaebf347687099511cc2c9f60c4b3c5..7215936c01f494089f4a292f0f98e90423890432 100644 |
| --- a/chrome/browser/google_apis/gdata_wapi_service.cc |
| +++ b/chrome/browser/google_apis/gdata_wapi_service.cc |
| @@ -11,6 +11,7 @@ |
| #include "base/message_loop_proxy.h" |
| #include "chrome/browser/google_apis/auth_service.h" |
| #include "chrome/browser/google_apis/gdata_wapi_operations.h" |
| +#include "chrome/browser/google_apis/gdata_wapi_url_util.h" |
| #include "chrome/browser/google_apis/operation_runner.h" |
| #include "chrome/browser/google_apis/time_util.h" |
| #include "chrome/common/net/url_util.h" |
| @@ -66,7 +67,8 @@ const char kDriveAppsScope[] = "https://www.googleapis.com/auth/drive.apps"; |
| } // namespace |
| GDataWapiService::GDataWapiService() |
| - : runner_(NULL) { |
| + : runner_(NULL), |
| + url_generator_(gdata_wapi_url_util::kBaseUrlForProduction) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| } |
| @@ -146,6 +148,7 @@ void GDataWapiService::GetDocuments( |
| GetDocumentsOperation* operation = |
| new google_apis::GetDocumentsOperation( |
| operation_registry(), |
| + url_generator_, |
| url, |
| static_cast<int>(start_changestamp), |
| search_query, |
| @@ -162,6 +165,7 @@ void GDataWapiService::GetDocumentEntry( |
| GetDocumentEntryOperation* operation = |
| new GetDocumentEntryOperation(operation_registry(), |
| + url_generator_, |
| resource_id, |
| callback); |
| runner_->StartOperationWithRetry(operation); |
| @@ -172,7 +176,7 @@ void GDataWapiService::GetAccountMetadata(const GetDataCallback& callback) { |
| GetAccountMetadataOperation* operation = |
| new GetAccountMetadataOperation( |
| - operation_registry(), callback); |
| + operation_registry(), url_generator_, callback); |
| runner_->StartOperationWithRetry(operation); |
| } |
| @@ -233,7 +237,11 @@ void GDataWapiService::AddNewDirectory( |
| runner_->StartOperationWithRetry( |
| new CreateDirectoryOperation( |
|
hashimoto
2012/11/20 09:10:17
nit: Can't we save one newline here?
satorux1
2012/11/21 00:34:18
Done.
|
| - operation_registry(), callback, parent_content_url, directory_name)); |
| + operation_registry(), |
| + url_generator_, |
| + callback, |
| + parent_content_url, |
| + directory_name)); |
| } |
| void GDataWapiService::CopyDocument( |
| @@ -243,8 +251,11 @@ void GDataWapiService::CopyDocument( |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| runner_->StartOperationWithRetry( |
| - new CopyDocumentOperation(operation_registry(), callback, |
| - resource_id, new_name)); |
| + new CopyDocumentOperation(operation_registry(), |
| + url_generator_, |
| + callback, |
| + resource_id, |
| + new_name)); |
| } |
| void GDataWapiService::RenameResource( |
| @@ -266,6 +277,7 @@ void GDataWapiService::AddResourceToDirectory( |
| runner_->StartOperationWithRetry( |
| new AddResourceToDirectoryOperation(operation_registry(), |
| + url_generator_, |
| callback, |
| parent_content_url, |
| resource_url)); |