| Index: chrome/browser/browsing_data/browsing_data_remover_unittest.cc
|
| diff --git a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
|
| index a0acbf71d3f513530a35b0376d316c35a88ff4ea..f9183ae0e0d2434dd016a6b9544d37e987841ef9 100644
|
| --- a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
|
| +++ b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
|
| @@ -89,7 +89,8 @@
|
| #include "url/origin.h"
|
|
|
| #if BUILDFLAG(ANDROID_JAVA_UI)
|
| -#include "chrome/browser/android/webapps/webapp_registry.h"
|
| +#include "chrome/browser/android/webapps/webapp_registry.mojom.h"
|
| +#include "mojo/public/cpp/bindings/strong_binding.h"
|
| #endif
|
|
|
| #if defined(OS_CHROMEOS)
|
| @@ -306,21 +307,20 @@ class TestStoragePartition : public StoragePartition {
|
| };
|
|
|
| #if BUILDFLAG(ANDROID_JAVA_UI)
|
| -class TestWebappRegistry : public WebappRegistry {
|
| +class TestWebappRegistry : public mojom::WebappRegistry {
|
| public:
|
| - TestWebappRegistry() : WebappRegistry() { }
|
| + explicit TestWebappRegistry(mojom::WebappRegistryRequest request)
|
| + : binding_(this, std::move(request)) {}
|
|
|
| - void UnregisterWebapps(const base::Closure& callback) override {
|
| - // Mocks out a JNI call and runs the callback as a delayed task.
|
| - BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE, callback,
|
| - base::TimeDelta::FromMilliseconds(10));
|
| + void UnregisterAllWebapps(const base::Closure& callback) override {
|
| + callback.Run();
|
| }
|
|
|
| void ClearWebappHistory(const base::Closure& callback) override {
|
| - // Mocks out a JNI call and runs the callback as a delayed task.
|
| - BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE, callback,
|
| - base::TimeDelta::FromMilliseconds(10));
|
| + callback.Run();
|
| }
|
| +
|
| + mojo::StrongBinding<mojom::WebappRegistry> binding_;
|
| };
|
| #endif
|
|
|
| @@ -1029,8 +1029,9 @@ class BrowsingDataRemoverTest : public testing::Test {
|
| BrowsingDataRemoverFactory::GetForBrowserContext(profile_.get());
|
|
|
| #if BUILDFLAG(ANDROID_JAVA_UI)
|
| - remover_->OverrideWebappRegistryForTesting(
|
| - std::unique_ptr<WebappRegistry>(new TestWebappRegistry()));
|
| + mojom::WebappRegistryPtr webapp_registry;
|
| + new TestWebappRegistry(mojo::GetProxy(&webapp_registry));
|
| + remover_->OverrideWebappRegistryForTesting(std::move(webapp_registry));
|
| #endif
|
| }
|
|
|
|
|