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/drive/gdata_wapi_service.h" | 5 #include "chrome/browser/drive/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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 base::Bind(&ParseResourceEntryAndRun, | 399 base::Bind(&ParseResourceEntryAndRun, |
400 callback), | 400 callback), |
401 parent_resource_id, | 401 parent_resource_id, |
402 directory_title)); | 402 directory_title)); |
403 } | 403 } |
404 | 404 |
405 CancelCallback GDataWapiService::CopyResource( | 405 CancelCallback GDataWapiService::CopyResource( |
406 const std::string& resource_id, | 406 const std::string& resource_id, |
407 const std::string& parent_resource_id, | 407 const std::string& parent_resource_id, |
408 const std::string& new_title, | 408 const std::string& new_title, |
| 409 const base::Time& last_modified, |
409 const GetResourceEntryCallback& callback) { | 410 const GetResourceEntryCallback& callback) { |
410 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 411 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
411 DCHECK(!callback.is_null()); | 412 DCHECK(!callback.is_null()); |
412 | 413 |
413 // GData WAPI doesn't support "copy" of regular files. | 414 // GData WAPI doesn't support "copy" of regular files. |
414 // This method should never be called if GData WAPI is enabled. | 415 // This method should never be called if GData WAPI is enabled. |
415 // Instead, client code should download the file (if needed) and upload it. | 416 // Instead, client code should download the file (if needed) and upload it. |
416 NOTREACHED(); | 417 NOTREACHED(); |
417 return CancelCallback(); | 418 return CancelCallback(); |
418 } | 419 } |
(...skipping 11 matching lines...) Expand all Loading... |
430 base::Bind(&ParseResourceEntryAndRun, | 431 base::Bind(&ParseResourceEntryAndRun, |
431 callback), | 432 callback), |
432 resource_id, | 433 resource_id, |
433 new_title)); | 434 new_title)); |
434 } | 435 } |
435 | 436 |
436 CancelCallback GDataWapiService::MoveResource( | 437 CancelCallback GDataWapiService::MoveResource( |
437 const std::string& resource_id, | 438 const std::string& resource_id, |
438 const std::string& parent_resource_id, | 439 const std::string& parent_resource_id, |
439 const std::string& new_title, | 440 const std::string& new_title, |
| 441 const base::Time& last_modified, |
440 const google_apis::GetResourceEntryCallback& callback) { | 442 const google_apis::GetResourceEntryCallback& callback) { |
441 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 443 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
442 DCHECK(!callback.is_null()); | 444 DCHECK(!callback.is_null()); |
443 | 445 |
444 // GData WAPI doesn't support to "move" resources. | 446 // GData WAPI doesn't support to "move" resources. |
445 // This method should never be called if GData WAPI is enabled. | 447 // This method should never be called if GData WAPI is enabled. |
446 // Instead, client code should rename the file, add new parent, and then | 448 // Instead, client code should rename the file, add new parent, and then |
447 // remove the old parent. | 449 // remove the old parent. |
448 NOTREACHED(); | 450 NOTREACHED(); |
449 return CancelCallback(); | 451 return CancelCallback(); |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 if (CanSendRequest()) { | 671 if (CanSendRequest()) { |
670 FOR_EACH_OBSERVER( | 672 FOR_EACH_OBSERVER( |
671 DriveServiceObserver, observers_, OnReadyToSendRequests()); | 673 DriveServiceObserver, observers_, OnReadyToSendRequests()); |
672 } else if (!HasRefreshToken()) { | 674 } else if (!HasRefreshToken()) { |
673 FOR_EACH_OBSERVER( | 675 FOR_EACH_OBSERVER( |
674 DriveServiceObserver, observers_, OnRefreshTokenInvalid()); | 676 DriveServiceObserver, observers_, OnRefreshTokenInvalid()); |
675 } | 677 } |
676 } | 678 } |
677 | 679 |
678 } // namespace drive | 680 } // namespace drive |
OLD | NEW |