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

Unified Diff: components/resource_provider/resource_provider_app.cc

Issue 1942473002: Eliminate mojo:resource_provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 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
Index: components/resource_provider/resource_provider_app.cc
diff --git a/components/resource_provider/resource_provider_app.cc b/components/resource_provider/resource_provider_app.cc
deleted file mode 100644
index 5e84fb4adc076799e38abb0c89ed28845b2f0fb7..0000000000000000000000000000000000000000
--- a/components/resource_provider/resource_provider_app.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2015 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/resource_provider/resource_provider_app.h"
-
-#include <utility>
-
-#include "components/resource_provider/file_utils.h"
-#include "components/resource_provider/resource_provider_impl.h"
-#include "services/shell/public/cpp/connection.h"
-#include "url/gurl.h"
-
-namespace resource_provider {
-
-ResourceProviderApp::ResourceProviderApp(
- const std::string& resource_provider_app_url)
- : resource_provider_app_url_(resource_provider_app_url) {
-}
-
-ResourceProviderApp::~ResourceProviderApp() {
-}
-
-void ResourceProviderApp::Initialize(shell::Connector* connector,
- const shell::Identity& identity,
- uint32_t id) {
- tracing_.Initialize(connector, identity.name());
-}
-
-bool ResourceProviderApp::AcceptConnection(shell::Connection* connection) {
- const base::FilePath app_path(
- GetPathForApplicationName(connection->GetRemoteIdentity().name()));
- if (app_path.empty())
- return false; // The specified app has no resources.
-
- connection->AddInterface<ResourceProvider>(this);
- return true;
-}
-
-void ResourceProviderApp::Create(
- shell::Connection* connection,
- mojo::InterfaceRequest<ResourceProvider> request) {
- const base::FilePath app_path(
- GetPathForApplicationName(connection->GetRemoteIdentity().name()));
- // We validated path at AcceptConnection() time, so it should still
- // be valid.
- CHECK(!app_path.empty());
- bindings_.AddBinding(
- new ResourceProviderImpl(app_path, resource_provider_app_url_),
- std::move(request));
-}
-
-} // namespace resource_provider
« no previous file with comments | « components/resource_provider/resource_provider_app.h ('k') | components/resource_provider/resource_provider_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698