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

Unified Diff: google_apis/gcm/engine/connection_factory_impl.cc

Issue 1873663002: Convert //google_apis 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
Index: google_apis/gcm/engine/connection_factory_impl.cc
diff --git a/google_apis/gcm/engine/connection_factory_impl.cc b/google_apis/gcm/engine/connection_factory_impl.cc
index de2523526bfc64435241b4166800c1cdbef91774..2e9b0279c51e04b517d8141f3105464a81d12b64 100644
--- a/google_apis/gcm/engine/connection_factory_impl.cc
+++ b/google_apis/gcm/engine/connection_factory_impl.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram.h"
#include "base/metrics/sparse_histogram.h"
#include "base/profiler/scoped_tracker.h"
@@ -332,21 +333,19 @@ void ConnectionFactoryImpl::InitHandler() {
connection_handler_->Init(login_request, socket_handle_.socket());
}
-scoped_ptr<net::BackoffEntry> ConnectionFactoryImpl::CreateBackoffEntry(
+std::unique_ptr<net::BackoffEntry> ConnectionFactoryImpl::CreateBackoffEntry(
const net::BackoffEntry::Policy* const policy) {
- return scoped_ptr<net::BackoffEntry>(new net::BackoffEntry(policy));
+ return std::unique_ptr<net::BackoffEntry>(new net::BackoffEntry(policy));
}
-scoped_ptr<ConnectionHandler> ConnectionFactoryImpl::CreateConnectionHandler(
+std::unique_ptr<ConnectionHandler>
+ConnectionFactoryImpl::CreateConnectionHandler(
base::TimeDelta read_timeout,
const ConnectionHandler::ProtoReceivedCallback& read_callback,
const ConnectionHandler::ProtoSentCallback& write_callback,
const ConnectionHandler::ConnectionChangedCallback& connection_callback) {
- return make_scoped_ptr<ConnectionHandler>(
- new ConnectionHandlerImpl(read_timeout,
- read_callback,
- write_callback,
- connection_callback));
+ return base::WrapUnique<ConnectionHandler>(new ConnectionHandlerImpl(
+ read_timeout, read_callback, write_callback, connection_callback));
}
base::TimeTicks ConnectionFactoryImpl::NowTicks() {

Powered by Google App Engine
This is Rietveld 408576698