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/chromeos/drive/sync_client.h" | 5 #include "chrome/browser/chromeos/drive/sync_client.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 void SyncClient::OnFetchFileComplete(const std::string& local_id, | 477 void SyncClient::OnFetchFileComplete(const std::string& local_id, |
478 FileError error, | 478 FileError error, |
479 const base::FilePath& local_path, | 479 const base::FilePath& local_path, |
480 scoped_ptr<ResourceEntry> entry) { | 480 scoped_ptr<ResourceEntry> entry) { |
481 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 481 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
482 OnTaskComplete(FETCH, local_id, error); | 482 OnTaskComplete(FETCH, local_id, error); |
483 if (error == FILE_ERROR_ABORT) { | 483 if (error == FILE_ERROR_ABORT) { |
484 // If user cancels download, unpin the file so that we do not sync the file | 484 // If user cancels download, unpin the file so that we do not sync the file |
485 // again. | 485 // again. |
486 base::PostTaskAndReplyWithResult( | 486 base::PostTaskAndReplyWithResult( |
487 blocking_task_runner_, | 487 blocking_task_runner_.get(), |
488 FROM_HERE, | 488 FROM_HERE, |
489 base::Bind(&FileCache::Unpin, base::Unretained(cache_), local_id), | 489 base::Bind(&FileCache::Unpin, base::Unretained(cache_), local_id), |
490 base::Bind(&util::EmptyFileOperationCallback)); | 490 base::Bind(&util::EmptyFileOperationCallback)); |
491 } | 491 } |
492 } | 492 } |
493 | 493 |
494 } // namespace internal | 494 } // namespace internal |
495 } // namespace drive | 495 } // namespace drive |
OLD | NEW |