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

Unified Diff: remoting/protocol/http_ice_config_request_unittest.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/http_ice_config_request.cc ('k') | remoting/protocol/ice_connection_to_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/http_ice_config_request_unittest.cc
diff --git a/remoting/protocol/http_ice_config_request_unittest.cc b/remoting/protocol/http_ice_config_request_unittest.cc
index 65cb9a4dd1d2e9db46de385d68d9ed063c2bcf33..fc105a5c58d6a28bbdc75119e1fa0a9b75086436 100644
--- a/remoting/protocol/http_ice_config_request_unittest.cc
+++ b/remoting/protocol/http_ice_config_request_unittest.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "remoting/base/url_request.h"
#include "remoting/protocol/ice_config.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -47,11 +48,12 @@ class FakeUrlRequestFactory : public UrlRequestFactory {
}
// UrlRequestFactory interface.
- scoped_ptr<UrlRequest> CreateUrlRequest(UrlRequest::Type type,
- const std::string& url) override {
+ std::unique_ptr<UrlRequest> CreateUrlRequest(
+ UrlRequest::Type type,
+ const std::string& url) override {
EXPECT_EQ(UrlRequest::Type::POST, type);
CHECK(results_.count(url));
- return make_scoped_ptr(new FakeUrlRequest(results_[url]));
+ return base::WrapUnique(new FakeUrlRequest(results_[url]));
}
std::map<std::string, UrlRequest::Result> results_;
@@ -81,13 +83,13 @@ static const char kTestUrl[] = "http://host/ice_config";
class HttpIceConfigRequestTest : public testing::Test {
public:
void OnResult(const IceConfig& config) {
- received_config_ = make_scoped_ptr(new IceConfig(config));
+ received_config_ = base::WrapUnique(new IceConfig(config));
}
protected:
FakeUrlRequestFactory url_request_factory_;
- scoped_ptr<HttpIceConfigRequest> request_;
- scoped_ptr<IceConfig> received_config_;
+ std::unique_ptr<HttpIceConfigRequest> request_;
+ std::unique_ptr<IceConfig> received_config_;
};
TEST_F(HttpIceConfigRequestTest, Parse) {
« no previous file with comments | « remoting/protocol/http_ice_config_request.cc ('k') | remoting/protocol/ice_connection_to_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698