Chromium Code Reviews| Index: chrome/browser/task_management/providers/browser_process/browser_process_task_provider.cc |
| diff --git a/chrome/browser/task_management/providers/browser_process/browser_process_task_provider.cc b/chrome/browser/task_management/providers/browser_process/browser_process_task_provider.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..aa21d414487e6e50460f7e4e2451f1357b0f5d03 |
| --- /dev/null |
| +++ b/chrome/browser/task_management/providers/browser_process/browser_process_task_provider.cc |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/task_management/providers/browser_process/browser_process_task_provider.h" |
| + |
| +namespace task_management { |
| + |
| +BrowserProcessTaskProvider::BrowserProcessTaskProvider() |
| + : 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
|
| +} |
| + |
| +BrowserProcessTaskProvider::~BrowserProcessTaskProvider() { |
| +} |
| + |
| +Task* BrowserProcessTaskProvider::GetTaskOfUrlRequest(int origin_pid, |
| + int child_id, |
| + int route_id) { |
| + 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
|
| + return &browser_process_task_; |
| + |
| + return nullptr; |
| +} |
| + |
| +void BrowserProcessTaskProvider::StartUpdating() { |
| + NotifyObserverTaskAdded(&browser_process_task_); |
| +} |
| + |
| +void BrowserProcessTaskProvider::StopUpdating() { |
| + // There's nothing to do here. The browser process task live as long as the |
| + // browser lives and when StopUpdating() is called the |observer_| has already |
| + // been cleared. |
| +} |
| + |
| +} // namespace task_management |