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/file_system.h" | 5 #include "chrome/browser/chromeos/drive/file_system.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 } | 365 } |
366 | 366 |
367 change_list_loader_->LoadIfNeeded( | 367 change_list_loader_->LoadIfNeeded( |
368 internal::DirectoryFetchInfo(), | 368 internal::DirectoryFetchInfo(), |
369 base::Bind(&FileSystem::OnUpdateChecked, | 369 base::Bind(&FileSystem::OnUpdateChecked, |
370 weak_ptr_factory_.GetWeakPtr())); | 370 weak_ptr_factory_.GetWeakPtr())); |
371 } | 371 } |
372 | 372 |
373 void FileSystem::SetupChangeListLoader() { | 373 void FileSystem::SetupChangeListLoader() { |
374 change_list_loader_.reset(new internal::ChangeListLoader( | 374 change_list_loader_.reset(new internal::ChangeListLoader( |
375 blocking_task_runner_.get(), resource_metadata_, scheduler_)); | 375 blocking_task_runner_.get(), |
| 376 resource_metadata_, |
| 377 scheduler_, |
| 378 drive_service_)); |
376 change_list_loader_->AddObserver(this); | 379 change_list_loader_->AddObserver(this); |
377 } | 380 } |
378 | 381 |
379 void FileSystem::CheckForUpdates() { | 382 void FileSystem::CheckForUpdates() { |
380 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 383 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
381 DVLOG(1) << "CheckForUpdates"; | 384 DVLOG(1) << "CheckForUpdates"; |
382 | 385 |
383 if (change_list_loader_) { | 386 if (change_list_loader_) { |
384 change_list_loader_->CheckForUpdates( | 387 change_list_loader_->CheckForUpdates( |
385 base::Bind(&FileSystem::OnUpdateChecked, | 388 base::Bind(&FileSystem::OnUpdateChecked, |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 if (util::IsSpecialResourceId(id)) | 1089 if (util::IsSpecialResourceId(id)) |
1087 return; | 1090 return; |
1088 | 1091 |
1089 util::Log(logging::LOG_INFO, | 1092 util::Log(logging::LOG_INFO, |
1090 "Thumbnail refresh for %s", directory_path.AsUTF8Unsafe().c_str()); | 1093 "Thumbnail refresh for %s", directory_path.AsUTF8Unsafe().c_str()); |
1091 change_list_loader_->LoadDirectoryFromServer( | 1094 change_list_loader_->LoadDirectoryFromServer( |
1092 id, base::Bind(&util::EmptyFileOperationCallback)); | 1095 id, base::Bind(&util::EmptyFileOperationCallback)); |
1093 } | 1096 } |
1094 | 1097 |
1095 } // namespace drive | 1098 } // namespace drive |
OLD | NEW |