Commit 1d917560 authored by Istiaque Ahmed's avatar Istiaque Ahmed Committed by Commit Bot

Extensions: Cleanup usages of ResetAndReturn on OnceCallbacks.

These do not need base::ResetAndReturn, use std::move(callack).Run()
instead.

Change-Id: Ifa90ffffcae8e64fd8cced276e482b3ecf21d6a9
Bug: 812717
Reviewed-on: https://chromium-review.googlesource.com/920645Reviewed-by: default avatarBen Wells <benwells@chromium.org>
Reviewed-by: default avatarKaran Bhatia <karandeepb@chromium.org>
Commit-Queue: Istiaque Ahmed <lazyboy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537353}
parent 1d2747c8
......@@ -819,7 +819,7 @@ class GetAuthTokenFunctionTest
const OAuth2TokenService::ScopeSet& scopes) override {
if (on_access_token_requested_.is_null())
return;
base::ResetAndReturn(&on_access_token_requested_).Run();
std::move(on_access_token_requested_).Run();
}
std::string extension_id_;
......
......@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <memory>
#include <utility>
#include <vector>
#include "base/macros.h"
......@@ -74,8 +75,8 @@ class TestAppIcon : public ChromeAppIconDelegate {
void OnIconUpdated(ChromeAppIcon* icon) override {
++icon_update_count_;
if (icon_update_count_ == icon_update_count_expected_ &&
!icon_updated_callback_.is_null()) {
base::ResetAndReturn(&icon_updated_callback_).Run();
icon_updated_callback_) {
std::move(icon_updated_callback_).Run();
}
}
......
......@@ -123,7 +123,7 @@ bool BookmarkAppConfirmationView::Accept() {
web_app_info_.title = GetTrimmedTitle();
web_app_info_.open_as_window =
open_as_window_checkbox_ && open_as_window_checkbox_->checked();
base::ResetAndReturn(&callback_).Run(true, web_app_info_);
std::move(callback_).Run(true, web_app_info_);
return true;
}
......
......@@ -76,7 +76,7 @@ void PWAConfirmationView::WindowClosing() {
}
bool PWAConfirmationView::Accept() {
base::ResetAndReturn(&callback_).Run(true, web_app_info_);
std::move(callback_).Run(true, web_app_info_);
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment