OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/extensions/mock_extension_special_storage_policy.h" | 5 #include "chrome/browser/extensions/mock_extension_special_storage_policy.h" |
6 | 6 |
7 MockExtensionSpecialStoragePolicy::MockExtensionSpecialStoragePolicy() {} | 7 MockExtensionSpecialStoragePolicy::MockExtensionSpecialStoragePolicy() |
| 8 : ExtensionSpecialStoragePolicy(NULL) {} |
| 9 |
8 MockExtensionSpecialStoragePolicy::~MockExtensionSpecialStoragePolicy() {} | 10 MockExtensionSpecialStoragePolicy::~MockExtensionSpecialStoragePolicy() {} |
9 | 11 |
10 bool MockExtensionSpecialStoragePolicy::IsStorageProtected(const GURL& origin) { | 12 bool MockExtensionSpecialStoragePolicy::IsStorageProtected(const GURL& origin) { |
11 return protected_.find(origin) != protected_.end(); | 13 return protected_.find(origin) != protected_.end(); |
12 } | 14 } |
13 | 15 |
14 bool MockExtensionSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) { | 16 bool MockExtensionSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) { |
15 return unlimited_.find(origin) != unlimited_.end(); | 17 return unlimited_.find(origin) != unlimited_.end(); |
16 } | 18 } |
17 | 19 |
| 20 bool MockExtensionSpecialStoragePolicy::IsStorageSessionOnly( |
| 21 const GURL& origin) { |
| 22 return session_only_.find(origin) != session_only_.end(); |
| 23 } |
| 24 |
18 bool MockExtensionSpecialStoragePolicy::IsFileHandler( | 25 bool MockExtensionSpecialStoragePolicy::IsFileHandler( |
19 const std::string& extension_id) { | 26 const std::string& extension_id) { |
20 return file_handlers_.find(extension_id) != file_handlers_.end(); | 27 return file_handlers_.find(extension_id) != file_handlers_.end(); |
21 } | 28 } |
OLD | NEW |