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

Unified Diff: remoting/host/setup/me2me_native_messaging_host_unittest.cc

Issue 609923004: Cleanup usage of scoped_ptr<> in remoting for C++11 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/setup/me2me_native_messaging_host_unittest.cc
diff --git a/remoting/host/setup/me2me_native_messaging_host_unittest.cc b/remoting/host/setup/me2me_native_messaging_host_unittest.cc
index 467531c09edb56df74b74eba25165263b8bdf2f6..35dcbac0179bdeff019aa626b2922daa154e94ac 100644
--- a/remoting/host/setup/me2me_native_messaging_host_unittest.cc
+++ b/remoting/host/setup/me2me_native_messaging_host_unittest.cc
@@ -328,12 +328,7 @@ void Me2MeNativeMessagingHostTest::StartHost() {
output_write_file.Pass()));
host_.reset(new Me2MeNativeMessagingHost(
- false,
- 0,
- channel.Pass(),
- daemon_controller,
- pairing_registry,
- scoped_ptr<remoting::OAuthClient>()));
+ false, 0, channel.Pass(), daemon_controller, pairing_registry, nullptr));
host_->Start(base::Bind(&Me2MeNativeMessagingHostTest::StopHost,
base::Unretained(this)));
@@ -389,19 +384,19 @@ Me2MeNativeMessagingHostTest::ReadMessageFromOutputPipe() {
int read_result = output_read_file_.ReadAtCurrentPos(
reinterpret_cast<char*>(&length), sizeof(length));
if (read_result != sizeof(length)) {
- return scoped_ptr<base::DictionaryValue>();
+ return nullptr;
}
std::string message_json(length, '\0');
read_result = output_read_file_.ReadAtCurrentPos(
string_as_array(&message_json), length);
if (read_result != static_cast<int>(length)) {
- return scoped_ptr<base::DictionaryValue>();
+ return nullptr;
}
scoped_ptr<base::Value> message(base::JSONReader::Read(message_json));
if (!message || !message->IsType(base::Value::TYPE_DICTIONARY)) {
- return scoped_ptr<base::DictionaryValue>();
+ return nullptr;
}
return scoped_ptr<base::DictionaryValue>(

Powered by Google App Engine
This is Rietveld 408576698