| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 &MockExtensionSystemFactoryFunction); | 204 &MockExtensionSystemFactoryFunction); |
| 205 | 205 |
| 206 EventRouterFactory::GetInstance()->SetTestingFactory(profile_.get(), | 206 EventRouterFactory::GetInstance()->SetTestingFactory(profile_.get(), |
| 207 &BuildEventRouter); | 207 &BuildEventRouter); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void TearDown() override { | 210 void TearDown() override { |
| 211 frontend_.reset(); | 211 frontend_.reset(); |
| 212 profile_.reset(); | 212 profile_.reset(); |
| 213 // Execute any pending deletion tasks. | 213 // Execute any pending deletion tasks. |
| 214 message_loop_.RunUntilIdle(); | 214 base::RunLoop().RunUntilIdle(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 protected: | 217 protected: |
| 218 // Adds a record of an extension or app to the extension service, then returns | 218 // Adds a record of an extension or app to the extension service, then returns |
| 219 // its storage area. | 219 // its storage area. |
| 220 ValueStore* AddExtensionAndGetStorage( | 220 ValueStore* AddExtensionAndGetStorage( |
| 221 const std::string& id, Manifest::Type type) { | 221 const std::string& id, Manifest::Type type) { |
| 222 scoped_refptr<const Extension> extension = | 222 scoped_refptr<const Extension> extension = |
| 223 util::AddExtensionWithId(profile_.get(), id, type); | 223 util::AddExtensionWithId(profile_.get(), id, type); |
| 224 return util::GetStorage(extension, frontend_.get()); | 224 return util::GetStorage(extension, frontend_.get()); |
| (...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 settings_namespace::SYNC, | 1411 settings_namespace::SYNC, |
| 1412 base::Bind(&UnlimitedSyncStorageTestCallback)); | 1412 base::Bind(&UnlimitedSyncStorageTestCallback)); |
| 1413 frontend_->RunWithStorage(extension, | 1413 frontend_->RunWithStorage(extension, |
| 1414 settings_namespace::LOCAL, | 1414 settings_namespace::LOCAL, |
| 1415 base::Bind(&UnlimitedLocalStorageTestCallback)); | 1415 base::Bind(&UnlimitedLocalStorageTestCallback)); |
| 1416 | 1416 |
| 1417 base::RunLoop().RunUntilIdle(); | 1417 base::RunLoop().RunUntilIdle(); |
| 1418 } | 1418 } |
| 1419 | 1419 |
| 1420 } // namespace extensions | 1420 } // namespace extensions |
| OLD | NEW |