Index: components/installedapp/installed_app_provider_impl_default.cc |
diff --git a/components/installedapp/installed_app_provider_impl_default.cc b/components/installedapp/installed_app_provider_impl_default.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..71ec954251cdbcaae0dd0335de9dfcd3ea40d18d |
--- /dev/null |
+++ b/components/installedapp/installed_app_provider_impl_default.cc |
@@ -0,0 +1,49 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "components/installedapp/installed_app_provider_impl.h" |
+ |
+#include "base/strings/utf_string_conversions.h" |
+#include "mojo/public/cpp/bindings/strong_binding.h" |
+ |
+namespace components { |
+ |
+namespace { |
+ |
+class InstalledAppProviderEmptyImpl : public InstalledAppProvider { |
+ public: |
+ void IsAppInstalled(const mojo::String& asset1, |
+ const mojo::String& asset2, |
+ const mojo::String& origin, |
+ const IsAppInstalledCallback& callback) override { |
+ callback.Run(false); |
+ }; |
+ |
+ void IsNativeAppInstalled( |
+ mojo::Map<mojo::String, mojo::Array<mojo::String>> verification, |
+ const mojo::String& origin, |
+ const IsNativeAppInstalledCallback& callback) { |
+ callback.Run(false); |
+ }; |
+ |
+ private: |
+ friend InstalledAppProviderImpl; |
+ |
+ InstalledAppProviderEmptyImpl( |
+ mojo::InterfaceRequest<InstalledAppProvider> request) |
+ : binding_(this, std::move(request)) {} |
+ ~InstalledAppProviderEmptyImpl() override {} |
+ |
+ // The binding between this object and the other end of the pipe. |
+ mojo::StrongBinding<InstalledAppProvider> binding_; |
+}; |
+ |
+} // namespace |
+ |
+// static |
+void InstalledAppProviderImpl::Create( |
+ mojo::InterfaceRequest<InstalledAppProvider> request) { |
+ new InstalledAppProviderEmptyImpl(std::move(request)); |
+} |
+} // namespace components |