| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/fake_file_system.h" | 5 #include "chrome/browser/chromeos/drive/fake_file_system.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "chrome/browser/chromeos/drive/drive.pb.h" | 13 #include "chrome/browser/chromeos/drive/drive.pb.h" |
| 14 #include "chrome/browser/chromeos/drive/file_errors.h" | 14 #include "chrome/browser/chromeos/drive/file_errors.h" |
| 15 #include "chrome/browser/chromeos/drive/file_system_util.h" | 15 #include "chrome/browser/chromeos/drive/file_system_util.h" |
| 16 #include "chrome/browser/chromeos/drive/resource_entry_conversion.h" | 16 #include "chrome/browser/chromeos/drive/resource_entry_conversion.h" |
| 17 #include "chrome/browser/drive/drive_service_interface.h" | 17 #include "chrome/browser/drive/drive_service_interface.h" |
| 18 #include "components/user_manager/user_id.h" |
| 18 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
| 19 #include "google_apis/drive/drive_api_parser.h" | 20 #include "google_apis/drive/drive_api_parser.h" |
| 20 | 21 |
| 21 namespace drive { | 22 namespace drive { |
| 22 namespace test_util { | 23 namespace test_util { |
| 23 | 24 |
| 24 using content::BrowserThread; | 25 using content::BrowserThread; |
| 25 | 26 |
| 26 FakeFileSystem::FakeFileSystem(DriveServiceInterface* drive_service) | 27 FakeFileSystem::FakeFileSystem(DriveServiceInterface* drive_service) |
| 27 : drive_service_(drive_service), | 28 : drive_service_(drive_service), |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 214 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 214 } | 215 } |
| 215 | 216 |
| 216 void FakeFileSystem::MarkCacheFileAsUnmounted( | 217 void FakeFileSystem::MarkCacheFileAsUnmounted( |
| 217 const base::FilePath& cache_file_path, | 218 const base::FilePath& cache_file_path, |
| 218 const FileOperationCallback& callback) { | 219 const FileOperationCallback& callback) { |
| 219 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 220 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 220 } | 221 } |
| 221 | 222 |
| 222 void FakeFileSystem::AddPermission(const base::FilePath& drive_file_path, | 223 void FakeFileSystem::AddPermission(const base::FilePath& drive_file_path, |
| 223 const std::string& email, | 224 const user_manager::UserID& user_id, |
| 224 google_apis::drive::PermissionRole role, | 225 google_apis::drive::PermissionRole role, |
| 225 const FileOperationCallback& callback) { | 226 const FileOperationCallback& callback) { |
| 226 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 227 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 227 } | 228 } |
| 228 | 229 |
| 229 void FakeFileSystem::SetProperty( | 230 void FakeFileSystem::SetProperty( |
| 230 const base::FilePath& drive_file_path, | 231 const base::FilePath& drive_file_path, |
| 231 google_apis::drive::Property::Visibility visibility, | 232 google_apis::drive::Property::Visibility visibility, |
| 232 const std::string& key, | 233 const std::string& key, |
| 233 const std::string& value, | 234 const std::string& value, |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 callback.Run(FILE_ERROR_OK, entry.Pass()); | 407 callback.Run(FILE_ERROR_OK, entry.Pass()); |
| 407 return; | 408 return; |
| 408 } | 409 } |
| 409 } | 410 } |
| 410 | 411 |
| 411 callback.Run(FILE_ERROR_NOT_FOUND, scoped_ptr<ResourceEntry>()); | 412 callback.Run(FILE_ERROR_NOT_FOUND, scoped_ptr<ResourceEntry>()); |
| 412 } | 413 } |
| 413 | 414 |
| 414 } // namespace test_util | 415 } // namespace test_util |
| 415 } // namespace drive | 416 } // namespace drive |
| OLD | NEW |