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

Unified Diff: google_apis/gaia/fake_gaia.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/gaia/fake_gaia.cc
diff --git a/google_apis/gaia/fake_gaia.cc b/google_apis/gaia/fake_gaia.cc
index 2da0c53165c85ba45f60598e5a179f57161973b4..583494b3f50c8e42e1ab58348287e4cf0229be96 100644
--- a/google_apis/gaia/fake_gaia.cc
+++ b/google_apis/gaia/fake_gaia.cc
@@ -300,19 +300,20 @@ void FakeGaia::Initialize() {
gaia_urls->oauth_user_info_url(), HandleOAuthUserInfo);
}
-scoped_ptr<HttpResponse> FakeGaia::HandleRequest(const HttpRequest& request) {
+std::unique_ptr<HttpResponse> FakeGaia::HandleRequest(
+ const HttpRequest& request) {
// The scheme and host of the URL is actually not important but required to
// get a valid GURL in order to parse |request.relative_url|.
GURL request_url = GURL("http://localhost").Resolve(request.relative_url);
std::string request_path = request_url.path();
- scoped_ptr<BasicHttpResponse> http_response(new BasicHttpResponse());
+ std::unique_ptr<BasicHttpResponse> http_response(new BasicHttpResponse());
RequestHandlerMap::iterator iter = request_handlers_.find(request_path);
if (iter != request_handlers_.end()) {
LOG(WARNING) << "Serving request " << request_path;
iter->second.Run(request, http_response.get());
} else {
LOG(ERROR) << "Unhandled request " << request_path;
- return scoped_ptr<HttpResponse>(); // Request not understood.
+ return std::unique_ptr<HttpResponse>(); // Request not understood.
}
return std::move(http_response);

Powered by Google App Engine
This is Rietveld 408576698