OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/files/file_util.h" | 6 #include "base/files/file_util.h" |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "content/public/test/async_file_test_helper.h" | 9 #include "content/public/test/async_file_test_helper.h" |
| 10 #include "storage/browser/fileapi/file_system_backend.h" |
| 11 #include "storage/browser/fileapi/file_system_context.h" |
| 12 #include "storage/browser/fileapi/file_system_operation_runner.h" |
| 13 #include "storage/browser/fileapi/file_system_url.h" |
| 14 #include "storage/browser/quota/quota_manager.h" |
10 #include "storage/common/fileapi/file_system_util.h" | 15 #include "storage/common/fileapi/file_system_util.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "webkit/browser/fileapi/file_system_backend.h" | |
13 #include "webkit/browser/fileapi/file_system_context.h" | |
14 #include "webkit/browser/fileapi/file_system_operation_runner.h" | |
15 #include "webkit/browser/fileapi/file_system_url.h" | |
16 #include "webkit/browser/quota/quota_manager.h" | |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 typedef storage::FileSystemOperation::FileEntryList FileEntryList; | 20 typedef storage::FileSystemOperation::FileEntryList FileEntryList; |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 void AssignAndQuit(base::RunLoop* run_loop, | 24 void AssignAndQuit(base::RunLoop* run_loop, |
25 base::File::Error* result_out, | 25 base::File::Error* result_out, |
26 base::File::Error result) { | 26 base::File::Error result) { |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 storage::QuotaStatusCode status = storage::kQuotaStatusUnknown; | 262 storage::QuotaStatusCode status = storage::kQuotaStatusUnknown; |
263 quota_manager->GetUsageAndQuota( | 263 quota_manager->GetUsageAndQuota( |
264 origin, | 264 origin, |
265 FileSystemTypeToQuotaStorageType(type), | 265 FileSystemTypeToQuotaStorageType(type), |
266 base::Bind(&DidGetUsageAndQuota, &status, usage, quota)); | 266 base::Bind(&DidGetUsageAndQuota, &status, usage, quota)); |
267 base::RunLoop().RunUntilIdle(); | 267 base::RunLoop().RunUntilIdle(); |
268 return status; | 268 return status; |
269 } | 269 } |
270 | 270 |
271 } // namespace storage | 271 } // namespace storage |
OLD | NEW |