Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(517)

Unified Diff: components/installedapp/installed_app_provider_impl_default.cc

Issue 1586563009: IsNativeAppInstalled Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/installedapp/installed_app_provider_impl.h ('k') | components/installedapp/installedapp.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « components/installedapp/installed_app_provider_impl.h ('k') | components/installedapp/installedapp.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698