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

Unified Diff: extensions/browser/api/socket/socket_api.cc

Issue 1902873002: Convert //extensions/browser/api from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « extensions/browser/api/socket/socket_api.h ('k') | extensions/browser/api/socket/socket_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/socket/socket_api.cc
diff --git a/extensions/browser/api/socket/socket_api.cc b/extensions/browser/api/socket/socket_api.cc
index 4039f6de4c2d7f6b012ba0c521f58ab44a73e584..b69d56f6744e118e39a7097a150cb80942fee8cc 100644
--- a/extensions/browser/api/socket/socket_api.cc
+++ b/extensions/browser/api/socket/socket_api.cc
@@ -75,9 +75,9 @@ bool SocketAsyncApiFunction::PrePrepare() {
bool SocketAsyncApiFunction::Respond() { return error_.empty(); }
-scoped_ptr<SocketResourceManagerInterface>
+std::unique_ptr<SocketResourceManagerInterface>
SocketAsyncApiFunction::CreateSocketResourceManager() {
- return scoped_ptr<SocketResourceManagerInterface>(
+ return std::unique_ptr<SocketResourceManagerInterface>(
new SocketResourceManager<Socket>());
}
@@ -139,7 +139,7 @@ void SocketAsyncApiFunction::OpenFirewallHoleOnUIThread(
DCHECK_CURRENTLY_ON(BrowserThread::UI);
AppFirewallHoleManager* manager =
AppFirewallHoleManager::Get(browser_context());
- scoped_ptr<AppFirewallHole, BrowserThread::DeleteOnUIThread> hole(
+ std::unique_ptr<AppFirewallHole, BrowserThread::DeleteOnUIThread> hole(
manager->Open(type, port, extension_id()).release());
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -149,7 +149,7 @@ void SocketAsyncApiFunction::OpenFirewallHoleOnUIThread(
void SocketAsyncApiFunction::OnFirewallHoleOpened(
int socket_id,
- scoped_ptr<AppFirewallHole, BrowserThread::DeleteOnUIThread> hole) {
+ std::unique_ptr<AppFirewallHole, BrowserThread::DeleteOnUIThread> hole) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!hole) {
error_ = kFirewallFailure;
@@ -461,8 +461,9 @@ void SocketAcceptFunction::AsyncWorkStart() {
}
}
-void SocketAcceptFunction::OnAccept(int result_code,
- scoped_ptr<net::TCPClientSocket> socket) {
+void SocketAcceptFunction::OnAccept(
+ int result_code,
+ std::unique_ptr<net::TCPClientSocket> socket) {
base::DictionaryValue* result = new base::DictionaryValue();
result->SetInteger(kResultCodeKey, result_code);
if (socket) {
@@ -1058,7 +1059,7 @@ void SocketSecureFunction::AsyncWorkStart() {
base::Bind(&SocketSecureFunction::TlsConnectDone, this));
}
-void SocketSecureFunction::TlsConnectDone(scoped_ptr<TLSSocket> socket,
+void SocketSecureFunction::TlsConnectDone(std::unique_ptr<TLSSocket> socket,
int result) {
// if an error occurred, socket MUST be NULL.
DCHECK(result == net::OK || socket == NULL);
« no previous file with comments | « extensions/browser/api/socket/socket_api.h ('k') | extensions/browser/api/socket/socket_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698