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 "content/public/test/mock_special_storage_policy.h" | 5 #include "storage/browser/test/mock_special_storage_policy.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
11 MockSpecialStoragePolicy::MockSpecialStoragePolicy() | 11 MockSpecialStoragePolicy::MockSpecialStoragePolicy() : all_unlimited_(false) {} |
12 : all_unlimited_(false) { | |
13 } | |
14 | 12 |
15 bool MockSpecialStoragePolicy::IsStorageProtected(const GURL& origin) { | 13 bool MockSpecialStoragePolicy::IsStorageProtected(const GURL& origin) { |
16 return base::ContainsKey(protected_, origin); | 14 return base::ContainsKey(protected_, origin); |
17 } | 15 } |
18 | 16 |
19 bool MockSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) { | 17 bool MockSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) { |
20 if (all_unlimited_) | 18 if (all_unlimited_) |
21 return true; | 19 return true; |
22 return base::ContainsKey(unlimited_, origin); | 20 return base::ContainsKey(unlimited_, origin); |
23 } | 21 } |
(...skipping 10 matching lines...) Expand all Loading... |
34 return !session_only_.empty(); | 32 return !session_only_.empty(); |
35 } | 33 } |
36 | 34 |
37 bool MockSpecialStoragePolicy::IsStorageDurable(const GURL& origin) { | 35 bool MockSpecialStoragePolicy::IsStorageDurable(const GURL& origin) { |
38 return base::ContainsKey(durable_, origin); | 36 return base::ContainsKey(durable_, origin); |
39 } | 37 } |
40 | 38 |
41 MockSpecialStoragePolicy::~MockSpecialStoragePolicy() {} | 39 MockSpecialStoragePolicy::~MockSpecialStoragePolicy() {} |
42 | 40 |
43 } // namespace content | 41 } // namespace content |
OLD | NEW |