OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/fast_unload_controller.h" | 5 #include "chrome/browser/ui/fast_unload_controller.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 | 484 |
485 if (tabs_needing_before_unload_.erase(contents) > 0 || | 485 if (tabs_needing_before_unload_.erase(contents) > 0 || |
486 tabs_needing_unload_.erase(contents) > 0) { | 486 tabs_needing_unload_.erase(contents) > 0) { |
487 if (tab_needing_before_unload_ack_ == NULL) | 487 if (tab_needing_before_unload_ack_ == NULL) |
488 PostTaskForProcessPendingTabs(); | 488 PostTaskForProcessPendingTabs(); |
489 } | 489 } |
490 } | 490 } |
491 | 491 |
492 void FastUnloadController::PostTaskForProcessPendingTabs() { | 492 void FastUnloadController::PostTaskForProcessPendingTabs() { |
493 base::ThreadTaskRunnerHandle::Get()->PostTask( | 493 base::ThreadTaskRunnerHandle::Get()->PostTask( |
494 FROM_HERE, base::Bind(&FastUnloadController::ProcessPendingTabs, | 494 FROM_HERE, base::BindOnce(&FastUnloadController::ProcessPendingTabs, |
495 weak_factory_.GetWeakPtr(), false)); | 495 weak_factory_.GetWeakPtr(), false)); |
496 } | 496 } |
497 | 497 |
498 } // namespace chrome | 498 } // namespace chrome |
OLD | NEW |