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

Unified Diff: android_webview/native/cookie_manager.cc

Issue 1552723002: Convert Pass()→std::move() in //android_webview (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
Index: android_webview/native/cookie_manager.cc
diff --git a/android_webview/native/cookie_manager.cc b/android_webview/native/cookie_manager.cc
index 4d3460f5b0cc31db8f81b570fec18e0a007ffb24..fac2ab96d4a040707910ee6732944a3cf9373de4 100644
--- a/android_webview/native/cookie_manager.cc
+++ b/android_webview/native/cookie_manager.cc
@@ -4,6 +4,8 @@
#include "android_webview/native/cookie_manager.h"
+#include <utility>
+
#include "android_webview/browser/aw_browser_context.h"
#include "android_webview/browser/aw_cookie_access_policy.h"
#include "android_webview/browser/net/init_native_callback.h"
@@ -340,7 +342,7 @@ void CookieManager::SetCookie(
const std::string& cookie_value,
scoped_ptr<BoolCookieCallbackHolder> callback_holder) {
BoolCallback callback =
- BoolCookieCallbackHolder::ConvertToCallback(callback_holder.Pass());
+ BoolCookieCallbackHolder::ConvertToCallback(std::move(callback_holder));
ExecCookieTask(base::Bind(&CookieManager::SetCookieHelper,
base::Unretained(this),
host,
@@ -402,7 +404,7 @@ void CookieManager::GetCookieValueCompleted(base::Closure complete,
void CookieManager::RemoveSessionCookies(
scoped_ptr<BoolCookieCallbackHolder> callback_holder) {
BoolCallback callback =
- BoolCookieCallbackHolder::ConvertToCallback(callback_holder.Pass());
+ BoolCookieCallbackHolder::ConvertToCallback(std::move(callback_holder));
ExecCookieTask(base::Bind(&CookieManager::RemoveSessionCookiesHelper,
base::Unretained(this),
callback));
@@ -430,7 +432,7 @@ void CookieManager::RemoveCookiesCompleted(
void CookieManager::RemoveAllCookies(
scoped_ptr<BoolCookieCallbackHolder> callback_holder) {
BoolCallback callback =
- BoolCookieCallbackHolder::ConvertToCallback(callback_holder.Pass());
+ BoolCookieCallbackHolder::ConvertToCallback(std::move(callback_holder));
ExecCookieTask(base::Bind(&CookieManager::RemoveAllCookiesHelper,
base::Unretained(this),
callback));
@@ -532,7 +534,8 @@ static void SetCookie(JNIEnv* env,
std::string cookie_value(ConvertJavaStringToUTF8(env, value));
scoped_ptr<BoolCookieCallbackHolder> callback(
new BoolCookieCallbackHolder(env, java_callback));
- CookieManager::GetInstance()->SetCookie(host, cookie_value, callback.Pass());
+ CookieManager::GetInstance()->SetCookie(host, cookie_value,
+ std::move(callback));
}
static void SetCookieSync(JNIEnv* env,
@@ -559,7 +562,7 @@ static void RemoveSessionCookies(JNIEnv* env,
const JavaParamRef<jobject>& java_callback) {
scoped_ptr<BoolCookieCallbackHolder> callback(
new BoolCookieCallbackHolder(env, java_callback));
- CookieManager::GetInstance()->RemoveSessionCookies(callback.Pass());
+ CookieManager::GetInstance()->RemoveSessionCookies(std::move(callback));
}
static void RemoveSessionCookiesSync(JNIEnv* env,
@@ -572,7 +575,7 @@ static void RemoveAllCookies(JNIEnv* env,
const JavaParamRef<jobject>& java_callback) {
scoped_ptr<BoolCookieCallbackHolder> callback(
new BoolCookieCallbackHolder(env, java_callback));
- CookieManager::GetInstance()->RemoveAllCookies(callback.Pass());
+ CookieManager::GetInstance()->RemoveAllCookies(std::move(callback));
}
static void RemoveAllCookiesSync(JNIEnv* env,
« no previous file with comments | « android_webview/native/aw_web_contents_delegate.cc ('k') | android_webview/native/permission/aw_permission_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698