| OLD | NEW |
| 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/google_apis/gdata_wapi_service.h" | 5 #include "chrome/browser/google_apis/gdata_wapi_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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 url_generator_, | 330 url_generator_, |
| 331 base::Bind(&ParseAppListAndRun, callback), | 331 base::Bind(&ParseAppListAndRun, callback), |
| 332 true)); // Include installed apps. | 332 true)); // Include installed apps. |
| 333 } | 333 } |
| 334 | 334 |
| 335 void GDataWapiService::DownloadFile( | 335 void GDataWapiService::DownloadFile( |
| 336 const base::FilePath& virtual_path, | 336 const base::FilePath& virtual_path, |
| 337 const base::FilePath& local_cache_path, | 337 const base::FilePath& local_cache_path, |
| 338 const GURL& download_url, | 338 const GURL& download_url, |
| 339 const DownloadActionCallback& download_action_callback, | 339 const DownloadActionCallback& download_action_callback, |
| 340 const GetContentCallback& get_content_callback) { | 340 const GetContentCallback& get_content_callback, |
| 341 const ProgressCallback& progress_callback) { |
| 341 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 342 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 342 DCHECK(!download_action_callback.is_null()); | 343 DCHECK(!download_action_callback.is_null()); |
| 343 // get_content_callback may be null. | 344 // get_content_callback and progress_callback may be null. |
| 344 | 345 |
| 345 runner_->StartOperationWithRetry( | 346 runner_->StartOperationWithRetry( |
| 346 new DownloadFileOperation(operation_registry(), | 347 new DownloadFileOperation(operation_registry(), |
| 347 url_request_context_getter_, | 348 url_request_context_getter_, |
| 348 download_action_callback, | 349 download_action_callback, |
| 349 get_content_callback, | 350 get_content_callback, |
| 351 progress_callback, |
| 350 download_url, | 352 download_url, |
| 351 virtual_path, | 353 virtual_path, |
| 352 local_cache_path)); | 354 local_cache_path)); |
| 353 } | 355 } |
| 354 | 356 |
| 355 void GDataWapiService::DeleteResource( | 357 void GDataWapiService::DeleteResource( |
| 356 const std::string& resource_id, | 358 const std::string& resource_id, |
| 357 const std::string& etag, | 359 const std::string& etag, |
| 358 const EntryActionCallback& callback) { | 360 const EntryActionCallback& callback) { |
| 359 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 361 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 } | 600 } |
| 599 | 601 |
| 600 void GDataWapiService::OnProgressUpdate( | 602 void GDataWapiService::OnProgressUpdate( |
| 601 const OperationProgressStatusList& list) { | 603 const OperationProgressStatusList& list) { |
| 602 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 604 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 603 FOR_EACH_OBSERVER( | 605 FOR_EACH_OBSERVER( |
| 604 DriveServiceObserver, observers_, OnProgressUpdate(list)); | 606 DriveServiceObserver, observers_, OnProgressUpdate(list)); |
| 605 } | 607 } |
| 606 | 608 |
| 607 } // namespace google_apis | 609 } // namespace google_apis |
| OLD | NEW |