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

Unified Diff: mojo/shell/network_application_loader.cc

Issue 775343004: Move //mojo/shell to //shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « mojo/shell/network_application_loader.h ('k') | mojo/shell/out_of_process_dynamic_service_runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/network_application_loader.cc
diff --git a/mojo/shell/network_application_loader.cc b/mojo/shell/network_application_loader.cc
deleted file mode 100644
index 6a2c519b160f879be54ae9f73acb5ff53db6d1b3..0000000000000000000000000000000000000000
--- a/mojo/shell/network_application_loader.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// 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 "mojo/shell/network_application_loader.h"
-
-#include "base/base_paths.h"
-#include "base/files/file_path.h"
-#include "base/path_service.h"
-#include "mojo/public/cpp/application/application_connection.h"
-#include "mojo/public/cpp/application/application_delegate.h"
-#include "mojo/public/cpp/application/application_impl.h"
-#include "mojo/services/network/network_service_impl.h"
-
-namespace {
-base::FilePath GetBasePath() {
- base::FilePath path;
- CHECK(PathService::Get(base::DIR_TEMP, &path));
- return path.Append(FILE_PATH_LITERAL("network_service"));
-}
-}
-
-namespace mojo {
-namespace shell {
-
-NetworkApplicationLoader::NetworkApplicationLoader() {
-}
-
-NetworkApplicationLoader::~NetworkApplicationLoader() {
-}
-
-void NetworkApplicationLoader::Load(ApplicationManager* manager,
- const GURL& url,
- ScopedMessagePipeHandle shell_handle,
- LoadCallback callback) {
- DCHECK(shell_handle.is_valid());
- uintptr_t key = reinterpret_cast<uintptr_t>(manager);
- if (apps_.find(key) == apps_.end()) {
- scoped_ptr<ApplicationImpl> app(
- new ApplicationImpl(this, shell_handle.Pass()));
- apps_.add(key, app.Pass());
- }
-}
-
-void NetworkApplicationLoader::OnApplicationError(ApplicationManager* manager,
- const GURL& url) {
- apps_.erase(reinterpret_cast<uintptr_t>(manager));
-}
-
-void NetworkApplicationLoader::Initialize(ApplicationImpl* app) {
- // The context must be created on the same thread as the network service.
- context_.reset(new NetworkContext(GetBasePath()));
-}
-
-bool NetworkApplicationLoader::ConfigureIncomingConnection(
- ApplicationConnection* connection) {
- connection->AddService(this);
- return true;
-}
-
-void NetworkApplicationLoader::Create(
- ApplicationConnection* connection,
- InterfaceRequest<NetworkService> request) {
- BindToRequest(new NetworkServiceImpl(connection, context_.get()), &request);
-}
-
-} // namespace shell
-} // namespace mojo
« no previous file with comments | « mojo/shell/network_application_loader.h ('k') | mojo/shell/out_of_process_dynamic_service_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698