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

Unified Diff: content/browser/mojo/mojo_child_connection.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « content/browser/mojo/mojo_application_host.h ('k') | content/browser/mojo/mojo_shell_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/mojo/mojo_child_connection.cc
diff --git a/content/browser/mojo/mojo_child_connection.cc b/content/browser/mojo/mojo_child_connection.cc
index 164ba0b027bae17f598ed9d237487f60e8b56b46..ffa7573f4ef0dfb483603443ff42dbe957d6c4ce 100644
--- a/content/browser/mojo/mojo_child_connection.cc
+++ b/content/browser/mojo/mojo_child_connection.cc
@@ -31,20 +31,21 @@ const char kMojoRenderProcessHostConnection[] =
class RenderProcessHostConnection : public base::SupportsUserData::Data {
public:
- explicit RenderProcessHostConnection(scoped_ptr<mojo::Connection> connection)
+ explicit RenderProcessHostConnection(
+ std::unique_ptr<mojo::Connection> connection)
: connection_(std::move(connection)) {}
~RenderProcessHostConnection() override {}
mojo::Connection* get() const { return connection_.get(); }
private:
- scoped_ptr<mojo::Connection> connection_;
+ std::unique_ptr<mojo::Connection> connection_;
DISALLOW_COPY_AND_ASSIGN(RenderProcessHostConnection);
};
void SetMojoConnection(RenderProcessHost* render_process_host,
- scoped_ptr<mojo::Connection> connection) {
+ std::unique_ptr<mojo::Connection> connection) {
render_process_host->SetUserData(
kMojoRenderProcessHostConnection,
new RenderProcessHostConnection(std::move(connection)));
@@ -117,7 +118,7 @@ std::string MojoConnectToChild(int child_process_id,
mojo::Connector::ConnectParams params(target);
params.set_client_process_connection(std::move(client),
std::move(pid_receiver_request));
- scoped_ptr<mojo::Connection> connection =
+ std::unique_ptr<mojo::Connection> connection =
MojoShellConnection::Get()->GetConnector()->Connect(&params);
// Store the connection on the RPH so client code can access it later via
« no previous file with comments | « content/browser/mojo/mojo_application_host.h ('k') | content/browser/mojo/mojo_shell_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698