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

Unified Diff: remoting/signaling/xmpp_stream_parser.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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 | « remoting/signaling/xmpp_stream_parser.h ('k') | remoting/signaling/xmpp_stream_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/signaling/xmpp_stream_parser.cc
diff --git a/remoting/signaling/xmpp_stream_parser.cc b/remoting/signaling/xmpp_stream_parser.cc
index 22cbbeeadd27e571b76c1c930c75c369fa5a12cc..f205d1862eadba0dd1b1f1a6462e2664d37a3198 100644
--- a/remoting/signaling/xmpp_stream_parser.cc
+++ b/remoting/signaling/xmpp_stream_parser.cc
@@ -7,6 +7,7 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "third_party/webrtc/libjingle/xmllite/xmlbuilder.h"
@@ -17,7 +18,7 @@ namespace remoting {
class XmppStreamParser::Core : public buzz::XmlParseHandler {
public:
- typedef base::Callback<void(scoped_ptr<buzz::XmlElement> stanza)>
+ typedef base::Callback<void(std::unique_ptr<buzz::XmlElement> stanza)>
OnStanzaCallback;
Core();
@@ -82,7 +83,7 @@ void XmppStreamParser::Core::StartElement(buzz::XmlParseContext* context,
++depth_;
if (depth_ == 1) {
- scoped_ptr<buzz::XmlElement> header(
+ std::unique_ptr<buzz::XmlElement> header(
buzz::XmlBuilder::BuildElement(context, name, atts));
if (!header) {
LOG(ERROR) << "Failed to parse XMPP stream header.";
@@ -109,7 +110,7 @@ void XmppStreamParser::Core::EndElement(buzz::XmlParseContext* context,
if (depth_ == 1) {
if (!on_stanza_callback_.is_null())
- on_stanza_callback_.Run(make_scoped_ptr(builder_.CreateElement()));
+ on_stanza_callback_.Run(base::WrapUnique(builder_.CreateElement()));
}
}
« no previous file with comments | « remoting/signaling/xmpp_stream_parser.h ('k') | remoting/signaling/xmpp_stream_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698