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

Unified Diff: ios/chrome/app/application_delegate/app_state.mm

Issue 2726523002: Pass Callback to TaskRunner by value and consume it on invocation (1) (Closed)
Patch Set: erase Closure* Created 3 years, 9 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
« no previous file with comments | « content/test/test_blink_web_unit_test_support.cc ('k') | ios/web/public/web_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/app/application_delegate/app_state.mm
diff --git a/ios/chrome/app/application_delegate/app_state.mm b/ios/chrome/app/application_delegate/app_state.mm
index 4227e4d4c1b06bde98946626c1c0785599e07956..6c0bc350f2bce389dae67030313d8cc58937ffe1 100644
--- a/ios/chrome/app/application_delegate/app_state.mm
+++ b/ios/chrome/app/application_delegate/app_state.mm
@@ -4,11 +4,13 @@
#import "ios/chrome/app/application_delegate/app_state.h"
+#include <utility>
+
+#include "base/callback.h"
#include "base/critical_closure.h"
#import "base/mac/bind_objc_block.h"
#include "base/metrics/histogram_macros.h"
#include "components/metrics/metrics_service.h"
-#import "ios/chrome/app/main_application_delegate.h"
#import "ios/chrome/app/application_delegate/app_navigation.h"
#import "ios/chrome/app/application_delegate/browser_launcher.h"
#import "ios/chrome/app/application_delegate/memory_warning_helper.h"
@@ -18,6 +20,7 @@
#import "ios/chrome/app/application_delegate/tab_switching.h"
#import "ios/chrome/app/application_delegate/user_activity_handler.h"
#import "ios/chrome/app/deferred_initialization_runner.h"
+#import "ios/chrome/app/main_application_delegate.h"
#import "ios/chrome/app/safe_mode/safe_mode_coordinator.h"
#import "ios/chrome/app/safe_mode_crashing_modules_config.h"
#include "ios/chrome/browser/application_context.h"
@@ -47,8 +50,8 @@
namespace {
// Helper method to post |closure| on the UI thread.
-void PostTaskOnUIThread(const base::Closure& closure) {
- web::WebThread::PostTask(web::WebThread::UI, FROM_HERE, closure);
+void PostTaskOnUIThread(base::Closure closure) {
+ web::WebThread::PostTask(web::WebThread::UI, FROM_HERE, std::move(closure));
}
NSString* const kStartupAttemptReset = @"StartupAttempReset";
} // namespace
« no previous file with comments | « content/test/test_blink_web_unit_test_support.cc ('k') | ios/web/public/web_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698