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 ...@@ -819,7 +819,7 @@ class GetAuthTokenFunctionTest
const OAuth2TokenService::ScopeSet& scopes) override { const OAuth2TokenService::ScopeSet& scopes) override {
if (on_access_token_requested_.is_null()) if (on_access_token_requested_.is_null())
return; return;
base::ResetAndReturn(&on_access_token_requested_).Run(); std::move(on_access_token_requested_).Run();
} }
std::string extension_id_; std::string extension_id_;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
#include <memory> #include <memory>
#include <utility>
#include <vector> #include <vector>
#include "base/macros.h" #include "base/macros.h"
...@@ -74,8 +75,8 @@ class TestAppIcon : public ChromeAppIconDelegate { ...@@ -74,8 +75,8 @@ class TestAppIcon : public ChromeAppIconDelegate {
void OnIconUpdated(ChromeAppIcon* icon) override { void OnIconUpdated(ChromeAppIcon* icon) override {
++icon_update_count_; ++icon_update_count_;
if (icon_update_count_ == icon_update_count_expected_ && if (icon_update_count_ == icon_update_count_expected_ &&
!icon_updated_callback_.is_null()) { icon_updated_callback_) {
base::ResetAndReturn(&icon_updated_callback_).Run(); std::move(icon_updated_callback_).Run();
} }
} }
......
...@@ -123,7 +123,7 @@ bool BookmarkAppConfirmationView::Accept() { ...@@ -123,7 +123,7 @@ bool BookmarkAppConfirmationView::Accept() {
web_app_info_.title = GetTrimmedTitle(); web_app_info_.title = GetTrimmedTitle();
web_app_info_.open_as_window = web_app_info_.open_as_window =
open_as_window_checkbox_ && open_as_window_checkbox_->checked(); 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; return true;
} }
......
...@@ -76,7 +76,7 @@ void PWAConfirmationView::WindowClosing() { ...@@ -76,7 +76,7 @@ void PWAConfirmationView::WindowClosing() {
} }
bool PWAConfirmationView::Accept() { bool PWAConfirmationView::Accept() {
base::ResetAndReturn(&callback_).Run(true, web_app_info_); std::move(callback_).Run(true, web_app_info_);
return true; 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