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

Side by Side Diff: chrome/browser/ui/unload_controller.cc

Issue 2824363002: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/ui (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/unload_controller.h" 5 #include "chrome/browser/ui/unload_controller.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 if (is_attempting_to_close_browser_) { 387 if (is_attempting_to_close_browser_) {
388 RemoveFromSet(&tabs_needing_before_unload_fired_, web_contents); 388 RemoveFromSet(&tabs_needing_before_unload_fired_, web_contents);
389 RemoveFromSet(&tabs_needing_unload_fired_, web_contents); 389 RemoveFromSet(&tabs_needing_unload_fired_, web_contents);
390 if (process_now) { 390 if (process_now) {
391 ProcessPendingTabs(false); 391 ProcessPendingTabs(false);
392 } else { 392 } else {
393 // Do not post a new task if there is already any. 393 // Do not post a new task if there is already any.
394 if (weak_factory_.HasWeakPtrs()) 394 if (weak_factory_.HasWeakPtrs())
395 return; 395 return;
396 base::ThreadTaskRunnerHandle::Get()->PostTask( 396 base::ThreadTaskRunnerHandle::Get()->PostTask(
397 FROM_HERE, base::Bind(&UnloadController::ProcessPendingTabs, 397 FROM_HERE, base::BindOnce(&UnloadController::ProcessPendingTabs,
398 weak_factory_.GetWeakPtr(), false)); 398 weak_factory_.GetWeakPtr(), false));
399 } 399 }
400 } 400 }
401 } 401 }
402 402
403 } // namespace chrome 403 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_actions_model.cc ('k') | chrome/browser/ui/views/autofill/autofill_popup_base_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698