| 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 "content/public/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 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 } | 23 } |
| 24 | 24 |
| 25 bool MockSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) { | 25 bool MockSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) { |
| 26 return ContainsKey(session_only_, origin); | 26 return ContainsKey(session_only_, origin); |
| 27 } | 27 } |
| 28 | 28 |
| 29 bool MockSpecialStoragePolicy::CanQueryDiskSize(const GURL& origin) { | 29 bool MockSpecialStoragePolicy::CanQueryDiskSize(const GURL& origin) { |
| 30 return ContainsKey(can_query_disk_size_, origin); | 30 return ContainsKey(can_query_disk_size_, origin); |
| 31 } | 31 } |
| 32 | 32 |
| 33 bool MockSpecialStoragePolicy::IsFileHandler(const std::string& extension_id) { | |
| 34 return ContainsKey(file_handlers_, extension_id); | |
| 35 } | |
| 36 | |
| 37 bool MockSpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) { | 33 bool MockSpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) { |
| 38 return ContainsKey(isolated_, origin); | 34 return ContainsKey(isolated_, origin); |
| 39 } | 35 } |
| 40 | 36 |
| 41 bool MockSpecialStoragePolicy::HasSessionOnlyOrigins() { | 37 bool MockSpecialStoragePolicy::HasSessionOnlyOrigins() { |
| 42 return !session_only_.empty(); | 38 return !session_only_.empty(); |
| 43 } | 39 } |
| 44 | 40 |
| 45 MockSpecialStoragePolicy::~MockSpecialStoragePolicy() {} | 41 MockSpecialStoragePolicy::~MockSpecialStoragePolicy() {} |
| 46 | 42 |
| 47 } // namespace content | 43 } // namespace content |
| OLD | NEW |