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

Unified Diff: services/shell/public/cpp/lib/application_runner.cc

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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: services/shell/public/cpp/lib/application_runner.cc
diff --git a/services/shell/public/cpp/lib/application_runner.cc b/services/shell/public/cpp/lib/application_runner.cc
index dd7a614ee788a3b80ae944b008808212b1bb5d8a..9f1580881afaee00578212810574ad422b1896db 100644
--- a/services/shell/public/cpp/lib/application_runner.cc
+++ b/services/shell/public/cpp/lib/application_runner.cc
@@ -7,20 +7,19 @@
#include "base/at_exit.h"
#include "base/bind.h"
#include "base/command_line.h"
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/process/launch.h"
#include "base/run_loop.h"
#include "services/shell/public/cpp/shell_client.h"
#include "services/shell/public/cpp/shell_connection.h"
-namespace mojo {
+namespace shell {
int g_application_runner_argc;
const char* const* g_application_runner_argv;
ApplicationRunner::ApplicationRunner(ShellClient* client)
- : client_(scoped_ptr<ShellClient>(client)),
+ : client_(std::unique_ptr<ShellClient>(client)),
message_loop_type_(base::MessageLoop::TYPE_DEFAULT),
has_run_(false) {}
@@ -42,20 +41,20 @@ MojoResult ApplicationRunner::Run(MojoHandle shell_client_request_handle,
DCHECK(!has_run_);
has_run_ = true;
- scoped_ptr<base::AtExitManager> at_exit;
+ std::unique_ptr<base::AtExitManager> at_exit;
if (init_base) {
InitBaseCommandLine();
at_exit.reset(new base::AtExitManager);
}
{
- scoped_ptr<base::MessageLoop> loop;
+ std::unique_ptr<base::MessageLoop> loop;
loop.reset(new base::MessageLoop(message_loop_type_));
connection_.reset(new ShellConnection(
client_.get(),
- MakeRequest<shell::mojom::ShellClient>(MakeScopedHandle(
- MessagePipeHandle(shell_client_request_handle)))));
+ mojo::MakeRequest<mojom::ShellClient>(mojo::MakeScopedHandle(
+ mojo::MessagePipeHandle(shell_client_request_handle)))));
base::RunLoop run_loop;
connection_->set_connection_lost_closure(run_loop.QuitClosure());
run_loop.Run();
@@ -89,4 +88,4 @@ void ApplicationRunner::Quit() {
base::MessageLoop::current()->QuitWhenIdle();
}
-} // namespace mojo
+} // namespace shell
« no previous file with comments | « services/shell/public/cpp/interface_registry.h ('k') | services/shell/public/cpp/lib/application_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698