diff options
author | davemoore <davemoore@chromium.org> | 2014-11-10 15:17:17 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-10 23:17:32 +0000 |
commit | 702233b7575e381998abb8e50d890ad1daa165df (patch) | |
tree | 30cecab174f3c885e928d57b4dc3f85153e41346 | |
parent | 42287bc6d09d1a402e866f751be7b8441c0de6a1 (diff) | |
download | chromium_src-702233b7575e381998abb8e50d890ad1daa165df.zip chromium_src-702233b7575e381998abb8e50d890ad1daa165df.tar.gz chromium_src-702233b7575e381998abb8e50d890ad1daa165df.tar.bz2 |
Minor cleanup of network_service
TBR=ben@chromium.org
BUG=
Review URL: https://codereview.chromium.org/714643003
Cr-Commit-Position: refs/heads/master@{#303531}
-rw-r--r-- | mojo/services/network/BUILD.gn | 3 | ||||
-rw-r--r-- | mojo/services/network/network_service.cc (renamed from mojo/services/network/main.cc) | 15 |
2 files changed, 6 insertions, 12 deletions
diff --git a/mojo/services/network/BUILD.gn b/mojo/services/network/BUILD.gn index f92a89e..e944c2b 100644 --- a/mojo/services/network/BUILD.gn +++ b/mojo/services/network/BUILD.gn @@ -12,11 +12,10 @@ shared_library("network") { "//mojo/application", "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings:bindings", - "//mojo/services/public/cpp/network", "//mojo/services/public/interfaces/network", ] - sources = [ "main.cc" ] + sources = [ "network_service.cc" ] } # GYP version: mojo/mojo_services.gypi:mojo_network_service_lib diff --git a/mojo/services/network/main.cc b/mojo/services/network/network_service.cc index 182ddf5..a8db8f4 100644 --- a/mojo/services/network/main.cc +++ b/mojo/services/network/network_service.cc @@ -2,9 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/at_exit.h" #include "base/base_paths.h" -#include "base/command_line.h" #include "base/files/file_path.h" #include "base/message_loop/message_loop.h" #include "base/path_service.h" @@ -13,15 +11,13 @@ #include "mojo/public/cpp/application/application_connection.h" #include "mojo/public/cpp/application/application_delegate.h" #include "mojo/public/cpp/application/interface_factory.h" -#include "mojo/public/cpp/bindings/interface_ptr.h" #include "mojo/services/network/network_context.h" #include "mojo/services/network/network_service_impl.h" -class Delegate : public mojo::ApplicationDelegate, - public mojo::InterfaceFactory<mojo::NetworkService> { - public: - Delegate() {} - +class NetworkServiceDelegate + : public mojo::ApplicationDelegate, + public mojo::InterfaceFactory<mojo::NetworkService> { + private: void Initialize(mojo::ApplicationImpl* app) override { base::FilePath base_path; CHECK(PathService::Get(base::DIR_TEMP, &base_path)); @@ -44,12 +40,11 @@ class Delegate : public mojo::ApplicationDelegate, new mojo::NetworkServiceImpl(connection, context_.get()), &request); } - private: scoped_ptr<mojo::NetworkContext> context_; }; MojoResult MojoMain(MojoHandle shell_handle) { - mojo::ApplicationRunnerChromium runner(new Delegate); + mojo::ApplicationRunnerChromium runner(new NetworkServiceDelegate); runner.set_message_loop_type(base::MessageLoop::TYPE_IO); return runner.Run(shell_handle); } |