| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 const base::FilePath& local_cache_path, | 319 const base::FilePath& local_cache_path, |
| 320 const GURL& download_url, | 320 const GURL& download_url, |
| 321 const DownloadActionCallback& download_action_callback, | 321 const DownloadActionCallback& download_action_callback, |
| 322 const GetContentCallback& get_content_callback, | 322 const GetContentCallback& get_content_callback, |
| 323 const ProgressCallback& progress_callback) { | 323 const ProgressCallback& progress_callback) { |
| 324 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 324 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 325 DCHECK(!download_action_callback.is_null()); | 325 DCHECK(!download_action_callback.is_null()); |
| 326 // get_content_callback and progress_callback may be null. | 326 // get_content_callback and progress_callback may be null. |
| 327 | 327 |
| 328 runner_->StartOperationWithRetry( | 328 runner_->StartOperationWithRetry( |
| 329 new DownloadFileOperation(runner_.get(), | 329 new DownloadFileRequest(runner_.get(), |
| 330 url_request_context_getter_, | 330 url_request_context_getter_, |
| 331 download_action_callback, | 331 download_action_callback, |
| 332 get_content_callback, | 332 get_content_callback, |
| 333 progress_callback, | 333 progress_callback, |
| 334 download_url, | 334 download_url, |
| 335 virtual_path, | 335 virtual_path, |
| 336 local_cache_path)); | 336 local_cache_path)); |
| 337 } | 337 } |
| 338 | 338 |
| 339 void GDataWapiService::DeleteResource( | 339 void GDataWapiService::DeleteResource( |
| 340 const std::string& resource_id, | 340 const std::string& resource_id, |
| 341 const std::string& etag, | 341 const std::string& etag, |
| 342 const EntryActionCallback& callback) { | 342 const EntryActionCallback& callback) { |
| 343 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 343 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 344 DCHECK(!callback.is_null()); | 344 DCHECK(!callback.is_null()); |
| 345 | 345 |
| 346 runner_->StartOperationWithRetry( | 346 runner_->StartOperationWithRetry( |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 if (CanStartOperation()) { | 599 if (CanStartOperation()) { |
| 600 FOR_EACH_OBSERVER( | 600 FOR_EACH_OBSERVER( |
| 601 DriveServiceObserver, observers_, OnReadyToPerformOperations()); | 601 DriveServiceObserver, observers_, OnReadyToPerformOperations()); |
| 602 } else if (!HasRefreshToken()) { | 602 } else if (!HasRefreshToken()) { |
| 603 FOR_EACH_OBSERVER( | 603 FOR_EACH_OBSERVER( |
| 604 DriveServiceObserver, observers_, OnRefreshTokenInvalid()); | 604 DriveServiceObserver, observers_, OnRefreshTokenInvalid()); |
| 605 } | 605 } |
| 606 } | 606 } |
| 607 | 607 |
| 608 } // namespace google_apis | 608 } // namespace google_apis |
| OLD | NEW |