OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/browser/renderer_host/pepper/quota_reservation.h" | 5 #include "content/browser/renderer_host/pepper/quota_reservation.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/files/file.h" | 11 #include "base/files/file.h" |
12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
13 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
14 #include "base/location.h" | 14 #include "base/location.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/scoped_ptr.h" |
16 #include "base/run_loop.h" | 17 #include "base/run_loop.h" |
17 #include "base/single_thread_task_runner.h" | 18 #include "base/single_thread_task_runner.h" |
18 #include "base/thread_task_runner_handle.h" | 19 #include "base/thread_task_runner_handle.h" |
19 #include "storage/browser/fileapi/quota/quota_reservation.h" | 20 #include "storage/browser/fileapi/quota/quota_reservation.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
21 | 22 |
22 using storage::QuotaReservationManager; | 23 using storage::QuotaReservationManager; |
23 | 24 |
24 namespace content { | 25 namespace content { |
25 | 26 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 EXPECT_EQ(amount, reserved_quota); | 241 EXPECT_EQ(amount, reserved_quota); |
241 EXPECT_EQ(2U, file_growths.size()); | 242 EXPECT_EQ(2U, file_growths.size()); |
242 EXPECT_EQ(file1_size, file_growths[kFile1ID].max_written_offset); | 243 EXPECT_EQ(file1_size, file_growths[kFile1ID].max_written_offset); |
243 EXPECT_EQ(file3_size, file_growths[kFile3ID].max_written_offset); | 244 EXPECT_EQ(file3_size, file_growths[kFile3ID].max_written_offset); |
244 | 245 |
245 test->CloseFile(kFile1ID, ppapi::FileGrowth(file1_size, 0)); | 246 test->CloseFile(kFile1ID, ppapi::FileGrowth(file1_size, 0)); |
246 test->CloseFile(kFile3ID, ppapi::FileGrowth(file3_size, 0)); | 247 test->CloseFile(kFile3ID, ppapi::FileGrowth(file3_size, 0)); |
247 } | 248 } |
248 | 249 |
249 } // namespace content | 250 } // namespace content |
OLD | NEW |