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

Unified Diff: remoting/protocol/content_description.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/protocol/content_description.h ('k') | remoting/protocol/content_description_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/content_description.cc
diff --git a/remoting/protocol/content_description.cc b/remoting/protocol/content_description.cc
index e1c43c601dc78a0625b1427bedbdadce8a422b6c..6ac678d2e0e2e4d760615393d8c147c201f1649a 100644
--- a/remoting/protocol/content_description.cc
+++ b/remoting/protocol/content_description.cc
@@ -8,6 +8,7 @@
#include "base/base64.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "remoting/base/constants.h"
#include "remoting/protocol/authenticator.h"
@@ -115,11 +116,10 @@ bool ParseChannelConfig(const XmlElement* element, bool codec_required,
} // namespace
ContentDescription::ContentDescription(
- scoped_ptr<CandidateSessionConfig> config,
- scoped_ptr<buzz::XmlElement> authenticator_message)
+ std::unique_ptr<CandidateSessionConfig> config,
+ std::unique_ptr<buzz::XmlElement> authenticator_message)
: candidate_config_(std::move(config)),
- authenticator_message_(std::move(authenticator_message)) {
-}
+ authenticator_message_(std::move(authenticator_message)) {}
ContentDescription::~ContentDescription() { }
@@ -200,14 +200,14 @@ bool ContentDescription::ParseChannelConfigs(
}
// static
-scoped_ptr<ContentDescription> ContentDescription::ParseXml(
+std::unique_ptr<ContentDescription> ContentDescription::ParseXml(
const XmlElement* element,
bool webrtc_transport) {
if (element->Name() != QName(kChromotingXmlNamespace, kDescriptionTag)) {
LOG(ERROR) << "Invalid description: " << element->Str();
return nullptr;
}
- scoped_ptr<CandidateSessionConfig> config(
+ std::unique_ptr<CandidateSessionConfig> config(
CandidateSessionConfig::CreateEmpty());
config->set_webrtc_supported(webrtc_transport);
@@ -232,12 +232,12 @@ scoped_ptr<ContentDescription> ContentDescription::ParseXml(
config->set_vp9_experiment_enabled(true);
}
- scoped_ptr<XmlElement> authenticator_message;
+ std::unique_ptr<XmlElement> authenticator_message;
const XmlElement* child = Authenticator::FindAuthenticatorMessage(element);
if (child)
authenticator_message.reset(new XmlElement(*child));
- return make_scoped_ptr(new ContentDescription(
+ return base::WrapUnique(new ContentDescription(
std::move(config), std::move(authenticator_message)));
}
« no previous file with comments | « remoting/protocol/content_description.h ('k') | remoting/protocol/content_description_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698