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 "extensions/browser/api/storage/settings_test_util.h" | 5 #include "extensions/browser/api/storage/settings_test_util.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "extensions/browser/api/storage/storage_frontend.h" | 8 #include "extensions/browser/api/storage/storage_frontend.h" |
9 #include "extensions/browser/extension_registry.h" | 9 #include "extensions/browser/extension_registry.h" |
10 #include "extensions/browser/extension_system_provider.h" | 10 #include "extensions/browser/extension_system_provider.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 &error)); | 86 &error)); |
87 DCHECK(extension.get()); | 87 DCHECK(extension.get()); |
88 DCHECK(error.empty()); | 88 DCHECK(error.empty()); |
89 | 89 |
90 // Ensure lookups via ExtensionRegistry (and ExtensionService) work even if | 90 // Ensure lookups via ExtensionRegistry (and ExtensionService) work even if |
91 // the test discards the referenced to the returned extension. | 91 // the test discards the referenced to the returned extension. |
92 ExtensionRegistry::Get(profile)->AddEnabled(extension); | 92 ExtensionRegistry::Get(profile)->AddEnabled(extension); |
93 | 93 |
94 for (std::set<std::string>::const_iterator it = permissions_set.begin(); | 94 for (std::set<std::string>::const_iterator it = permissions_set.begin(); |
95 it != permissions_set.end(); ++it) { | 95 it != permissions_set.end(); ++it) { |
96 DCHECK(extension->HasAPIPermission(*it)); | 96 DCHECK(extension->permissions_data()->HasAPIPermission(*it)); |
97 } | 97 } |
98 | 98 |
99 return extension; | 99 return extension; |
100 } | 100 } |
101 | 101 |
102 // MockExtensionSystem | 102 // MockExtensionSystem |
103 | 103 |
104 MockExtensionSystem::MockExtensionSystem(Profile* profile) | 104 MockExtensionSystem::MockExtensionSystem(Profile* profile) |
105 : TestExtensionSystem(profile) {} | 105 : TestExtensionSystem(profile) {} |
106 MockExtensionSystem::~MockExtensionSystem() {} | 106 MockExtensionSystem::~MockExtensionSystem() {} |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 void ScopedSettingsStorageFactory::DeleteDatabaseIfExists( | 151 void ScopedSettingsStorageFactory::DeleteDatabaseIfExists( |
152 const base::FilePath& base_path, | 152 const base::FilePath& base_path, |
153 const std::string& extension_id) { | 153 const std::string& extension_id) { |
154 delegate_->DeleteDatabaseIfExists(base_path, extension_id); | 154 delegate_->DeleteDatabaseIfExists(base_path, extension_id); |
155 } | 155 } |
156 | 156 |
157 } // namespace settings_test_util | 157 } // namespace settings_test_util |
158 | 158 |
159 } // namespace extensions | 159 } // namespace extensions |
OLD | NEW |