| 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 "webkit/browser/fileapi/quota/quota_backend_impl.h" | 5 #include "webkit/browser/fileapi/quota/quota_backend_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "webkit/browser/fileapi/file_system_usage_cache.h" | 12 #include "webkit/browser/fileapi/file_system_usage_cache.h" |
| 13 #include "webkit/browser/fileapi/obfuscated_file_util.h" | 13 #include "webkit/browser/fileapi/obfuscated_file_util.h" |
| 14 #include "webkit/browser/quota/quota_manager.h" | 14 #include "webkit/browser/quota/quota_manager_proxy.h" |
| 15 | 15 |
| 16 namespace fileapi { | 16 namespace fileapi { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 const char kOrigin[] = "http://example.com"; | 20 const char kOrigin[] = "http://example.com"; |
| 21 | 21 |
| 22 bool DidReserveQuota(bool accepted, | 22 bool DidReserveQuota(bool accepted, |
| 23 base::PlatformFileError* error_out, | 23 base::PlatformFileError* error_out, |
| 24 base::PlatformFileError error) { | 24 base::PlatformFileError error) { |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 uint32 dirty = 0; | 239 uint32 dirty = 0; |
| 240 ASSERT_TRUE(file_system_usage_cache_.GetDirty(path, &dirty)); | 240 ASSERT_TRUE(file_system_usage_cache_.GetDirty(path, &dirty)); |
| 241 EXPECT_EQ(1u, dirty); | 241 EXPECT_EQ(1u, dirty); |
| 242 | 242 |
| 243 backend_->DecrementDirtyCount(GURL(kOrigin), type); | 243 backend_->DecrementDirtyCount(GURL(kOrigin), type); |
| 244 ASSERT_TRUE(file_system_usage_cache_.GetDirty(path, &dirty)); | 244 ASSERT_TRUE(file_system_usage_cache_.GetDirty(path, &dirty)); |
| 245 EXPECT_EQ(0u, dirty); | 245 EXPECT_EQ(0u, dirty); |
| 246 } | 246 } |
| 247 | 247 |
| 248 } // namespace fileapi | 248 } // namespace fileapi |
| OLD | NEW |