| 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 <map> | 5 #include <map> |
| 6 #include <queue> | 6 #include <queue> |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 ExternalMountPoints::CreateRefCounted().get(), | 64 ExternalMountPoints::CreateRefCounted().get(), |
| 65 make_scoped_refptr(new quota::MockSpecialStoragePolicy), | 65 make_scoped_refptr(new quota::MockSpecialStoragePolicy), |
| 66 quota_manager_proxy_, | 66 quota_manager_proxy_, |
| 67 base_dir, | 67 base_dir, |
| 68 CreateAllowFileAccessOptions()); | 68 CreateAllowFileAccessOptions()); |
| 69 | 69 |
| 70 // Prepare the origin's root directory. | 70 // Prepare the origin's root directory. |
| 71 FileSystemMountPointProvider* mount_point_provider = | 71 FileSystemMountPointProvider* mount_point_provider = |
| 72 file_system_context_->GetMountPointProvider(src_type_); | 72 file_system_context_->GetMountPointProvider(src_type_); |
| 73 mount_point_provider->GetFileSystemRootPathOnFileThread( | 73 mount_point_provider->GetFileSystemRootPathOnFileThread( |
| 74 SourceURL(""), | 74 SourceURL(std::string()), true /* create */); |
| 75 true /* create */); | |
| 76 mount_point_provider = | 75 mount_point_provider = |
| 77 file_system_context_->GetMountPointProvider(dest_type_); | 76 file_system_context_->GetMountPointProvider(dest_type_); |
| 78 mount_point_provider->GetFileSystemRootPathOnFileThread( | 77 mount_point_provider->GetFileSystemRootPathOnFileThread( |
| 79 DestURL(""), | 78 DestURL(std::string()), true /* create */); |
| 80 true /* create */); | |
| 81 | 79 |
| 82 // Grant relatively big quota initially. | 80 // Grant relatively big quota initially. |
| 83 quota_manager_->SetQuota(origin_, | 81 quota_manager_->SetQuota(origin_, |
| 84 FileSystemTypeToQuotaStorageType(src_type_), | 82 FileSystemTypeToQuotaStorageType(src_type_), |
| 85 1024 * 1024); | 83 1024 * 1024); |
| 86 quota_manager_->SetQuota(origin_, | 84 quota_manager_->SetQuota(origin_, |
| 87 FileSystemTypeToQuotaStorageType(dest_type_), | 85 FileSystemTypeToQuotaStorageType(dest_type_), |
| 88 1024 * 1024); | 86 1024 * 1024); |
| 89 } | 87 } |
| 90 | 88 |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 test::kRegularTestCaseSize); | 414 test::kRegularTestCaseSize); |
| 417 | 415 |
| 418 int64 src_new_usage = helper.GetSourceUsage(); | 416 int64 src_new_usage = helper.GetSourceUsage(); |
| 419 ASSERT_EQ(src_initial_usage, src_new_usage); | 417 ASSERT_EQ(src_initial_usage, src_new_usage); |
| 420 | 418 |
| 421 int64 dest_increase = helper.GetDestUsage() - dest_initial_usage; | 419 int64 dest_increase = helper.GetDestUsage() - dest_initial_usage; |
| 422 ASSERT_EQ(src_increase, dest_increase); | 420 ASSERT_EQ(src_increase, dest_increase); |
| 423 } | 421 } |
| 424 | 422 |
| 425 } // namespace fileapi | 423 } // namespace fileapi |
| OLD | NEW |