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

Side by Side Diff: mojo/shell/shell_application_delegate.cc

Issue 1568073002: Reduce string copies in GURL creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/shell/shell_application_delegate.h" 5 #include "mojo/shell/shell_application_delegate.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 21 matching lines...) Expand all
32 ApplicationConnection* connection, 32 ApplicationConnection* connection,
33 InterfaceRequest<mojom::ApplicationManager> request) { 33 InterfaceRequest<mojom::ApplicationManager> request) {
34 bindings_.AddBinding(this, std::move(request)); 34 bindings_.AddBinding(this, std::move(request));
35 } 35 }
36 36
37 void ShellApplicationDelegate::CreateInstanceForHandle( 37 void ShellApplicationDelegate::CreateInstanceForHandle(
38 ScopedHandle channel, 38 ScopedHandle channel,
39 const String& url, 39 const String& url,
40 CapabilityFilterPtr filter, 40 CapabilityFilterPtr filter,
41 InterfaceRequest<mojom::PIDReceiver> pid_receiver) { 41 InterfaceRequest<mojom::PIDReceiver> pid_receiver) {
42 manager_->CreateInstanceForHandle(std::move(channel), GURL(url), 42 manager_->CreateInstanceForHandle(std::move(channel), GURL(url.get()),
43 std::move(filter), std::move(pid_receiver)); 43 std::move(filter), std::move(pid_receiver));
44 } 44 }
45 45
46 void ShellApplicationDelegate::RegisterProcessWithBroker( 46 void ShellApplicationDelegate::RegisterProcessWithBroker(
47 uint32_t pid, ScopedHandle pipe) { 47 uint32_t pid, ScopedHandle pipe) {
48 // First, for security we want to verify that the given pid's grand parent 48 // First, for security we want to verify that the given pid's grand parent
49 // process is us. 49 // process is us.
50 base::Process process = base::Process::OpenWithExtraPrivileges( 50 base::Process process = base::Process::OpenWithExtraPrivileges(
51 static_cast<base::ProcessId>(pid)); 51 static_cast<base::ProcessId>(pid));
52 if (!process.IsValid()) { 52 if (!process.IsValid()) {
(...skipping 28 matching lines...) Expand all
81 embedder::ChildProcessLaunched(process.Handle(), std::move(platform_pipe)); 81 embedder::ChildProcessLaunched(process.Handle(), std::move(platform_pipe));
82 } 82 }
83 83
84 void ShellApplicationDelegate::AddListener( 84 void ShellApplicationDelegate::AddListener(
85 mojom::ApplicationManagerListenerPtr listener) { 85 mojom::ApplicationManagerListenerPtr listener) {
86 manager_->AddListener(std::move(listener)); 86 manager_->AddListener(std::move(listener));
87 } 87 }
88 88
89 } // namespace shell 89 } // namespace shell
90 } // namespace mojo 90 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/package_manager/package_manager_impl.cc ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698