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

Side by Side Diff: chrome/browser/task_management/sampling/task_group.cc

Issue 2183023005: TaskManager: unique_ptr<> ownership of TaskGroups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tm_default_selection
Patch Set: TaskManager: use containers of unique_ptrs instead of stl_util.h Created 4 years, 4 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698