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: chromeos/timezone/timezone_request.cc

Issue 1556773002: Convert Pass()→std::move() in //chromeos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « chromeos/timezone/timezone_provider.cc ('k') | chromeos/timezone/timezone_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/timezone/timezone_request.cc
diff --git a/chromeos/timezone/timezone_request.cc b/chromeos/timezone/timezone_request.cc
index 4d787bdd00e5874db1b7644a3b5bf09de2ae3d1f..46c0a9bf835daa9684fbf000cfb9f32085966c1a 100644
--- a/chromeos/timezone/timezone_request.cc
+++ b/chromeos/timezone/timezone_request.cc
@@ -5,8 +5,8 @@
#include "chromeos/timezone/timezone_request.h"
#include <stddef.h>
-
#include <string>
+#include <utility>
#include "base/json/json_reader.h"
#include "base/metrics/histogram.h"
@@ -275,21 +275,21 @@ scoped_ptr<TimeZoneResponseData> GetTimeZoneFromResponse(
if (!http_success) {
PrintTimeZoneError(server_url, "No response received", timezone.get());
RecordUmaEvent(TIMEZONE_REQUEST_EVENT_RESPONSE_EMPTY);
- return timezone.Pass();
+ return timezone;
}
if (status_code != net::HTTP_OK) {
std::string message = "Returned error code ";
message += base::IntToString(status_code);
PrintTimeZoneError(server_url, message, timezone.get());
RecordUmaEvent(TIMEZONE_REQUEST_EVENT_RESPONSE_NOT_OK);
- return timezone.Pass();
+ return timezone;
}
if (!ParseServerResponse(server_url, response_body, timezone.get()))
- return timezone.Pass();
+ return timezone;
RecordUmaEvent(TIMEZONE_REQUEST_EVENT_RESPONSE_SUCCESS);
- return timezone.Pass();
+ return timezone;
}
} // namespace
@@ -400,7 +400,7 @@ void TimeZoneRequest::OnURLFetchComplete(const net::URLFetcher* source) {
// callback.Run() usually destroys TimeZoneRequest, because this is the way
// callback is implemented in TimeZoneProvider.
- callback.Run(timezone.Pass(), server_error);
+ callback.Run(std::move(timezone), server_error);
// "this" is already destroyed here.
}
« no previous file with comments | « chromeos/timezone/timezone_provider.cc ('k') | chromeos/timezone/timezone_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698