Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/task_management/providers/browser_process/browser_proce ss_task_provider.h" | |
| 6 | |
| 7 namespace task_management { | |
| 8 | |
| 9 BrowserProcessTaskProvider::BrowserProcessTaskProvider() | |
| 10 : browser_process_task_() { | |
|
Lei Zhang
2015/04/01 22:47:50
I don't think this is needed?
afakhry
2015/04/03 01:51:00
It's not needed, but it's good practice, and bette
| |
| 11 } | |
| 12 | |
| 13 BrowserProcessTaskProvider::~BrowserProcessTaskProvider() { | |
| 14 } | |
| 15 | |
| 16 Task* BrowserProcessTaskProvider::GetTaskOfUrlRequest(int origin_pid, | |
| 17 int child_id, | |
| 18 int route_id) { | |
| 19 if (origin_pid == 0 && child_id == -1) | |
|
Lei Zhang
2015/04/01 22:47:50
Since I don't understand what the parameters to Ge
afakhry
2015/04/03 01:51:00
I added detailed comments to this function's decla
| |
| 20 return &browser_process_task_; | |
| 21 | |
| 22 return nullptr; | |
| 23 } | |
| 24 | |
| 25 void BrowserProcessTaskProvider::StartUpdating() { | |
| 26 NotifyObserverTaskAdded(&browser_process_task_); | |
| 27 } | |
| 28 | |
| 29 void BrowserProcessTaskProvider::StopUpdating() { | |
| 30 // There's nothing to do here. The browser process task live as long as the | |
| 31 // browser lives and when StopUpdating() is called the |observer_| has already | |
| 32 // been cleared. | |
| 33 } | |
| 34 | |
| 35 } // namespace task_management | |
| OLD | NEW |