| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/task_management/sampling/task_group.h" | 5 #include "chrome/browser/task_management/sampling/task_group.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/stl_util.h" | |
| 13 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 14 #include "chrome/browser/task_management/task_manager_observer.h" | 13 #include "chrome/browser/task_management/task_manager_observer.h" |
| 15 #include "components/nacl/browser/nacl_browser.h" | 14 #include "components/nacl/browser/nacl_browser.h" |
| 16 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
| 17 #include "gpu/ipc/common/memory_stats.h" | 16 #include "gpu/ipc/common/memory_stats.h" |
| 18 | 17 |
| 19 namespace task_management { | 18 namespace task_management { |
| 20 | 19 |
| 21 namespace { | 20 namespace { |
| 22 | 21 |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 264 |
| 266 void TaskGroup::OnBackgroundRefreshTypeFinished(int64_t finished_refresh_type) { | 265 void TaskGroup::OnBackgroundRefreshTypeFinished(int64_t finished_refresh_type) { |
| 267 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 266 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 268 | 267 |
| 269 current_on_bg_done_flags_ |= finished_refresh_type; | 268 current_on_bg_done_flags_ |= finished_refresh_type; |
| 270 if (AreBackgroundCalculationsDone()) | 269 if (AreBackgroundCalculationsDone()) |
| 271 on_background_calculations_done_.Run(); | 270 on_background_calculations_done_.Run(); |
| 272 } | 271 } |
| 273 | 272 |
| 274 } // namespace task_management | 273 } // namespace task_management |
| OLD | NEW |