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

Side by Side Diff: mojo/edk/system/incoming_endpoint.cc

Issue 1353683005: EDK: Convert remaining scoped_ptr -> std::unique_ptr in //mojo/edk/system. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/edk/system/incoming_endpoint.h" 5 #include "mojo/edk/system/incoming_endpoint.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "mojo/edk/system/channel_endpoint.h" 8 #include "mojo/edk/system/channel_endpoint.h"
9 #include "mojo/edk/system/data_pipe.h" 9 #include "mojo/edk/system/data_pipe.h"
10 #include "mojo/edk/system/message_in_transit.h" 10 #include "mojo/edk/system/message_in_transit.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 endpoint_ = nullptr; 60 endpoint_ = nullptr;
61 } 61 }
62 } 62 }
63 63
64 bool IncomingEndpoint::OnReadMessage(unsigned /*port*/, 64 bool IncomingEndpoint::OnReadMessage(unsigned /*port*/,
65 MessageInTransit* message) { 65 MessageInTransit* message) {
66 MutexLocker locker(&mutex_); 66 MutexLocker locker(&mutex_);
67 if (!endpoint_) 67 if (!endpoint_)
68 return false; 68 return false;
69 69
70 message_queue_.AddMessage(make_scoped_ptr(message)); 70 message_queue_.AddMessage(std::unique_ptr<MessageInTransit>(message));
71 return true; 71 return true;
72 } 72 }
73 73
74 void IncomingEndpoint::OnDetachFromChannel(unsigned /*port*/) { 74 void IncomingEndpoint::OnDetachFromChannel(unsigned /*port*/) {
75 Close(); 75 Close();
76 } 76 }
77 77
78 IncomingEndpoint::~IncomingEndpoint() { 78 IncomingEndpoint::~IncomingEndpoint() {
79 } 79 }
80 80
81 } // namespace system 81 } // namespace system
82 } // namespace mojo 82 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/endpoint_relayer_unittest.cc ('k') | mojo/edk/system/local_message_pipe_endpoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698