summaryrefslogtreecommitdiffstats
path: root/chrome/browser/task_manager
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-08 18:06:44 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-08 18:06:44 +0000
commit78994ab0a043ead9b3edb4a48c7f13cc6c2aede6 (patch)
tree357ae4e0cf8bf140e616d3086b29472043aaf0e5 /chrome/browser/task_manager
parenta7a265efd24072f9dc7b5f737ec84d5ae0553cd6 (diff)
downloadchromium_src-78994ab0a043ead9b3edb4a48c7f13cc6c2aede6.zip
chromium_src-78994ab0a043ead9b3edb4a48c7f13cc6c2aede6.tar.gz
chromium_src-78994ab0a043ead9b3edb4a48c7f13cc6c2aede6.tar.bz2
Add the "virtual" keyword on method overrides that are missing it.
BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5648004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager')
-rw-r--r--chrome/browser/task_manager/task_manager.h17
-rw-r--r--chrome/browser/task_manager/task_manager_resource_providers.cc8
-rw-r--r--chrome/browser/task_manager/task_manager_resource_providers.h77
3 files changed, 54 insertions, 48 deletions
diff --git a/chrome/browser/task_manager/task_manager.h b/chrome/browser/task_manager/task_manager.h
index 5b33c75..bd8ac5f 100644
--- a/chrome/browser/task_manager/task_manager.h
+++ b/chrome/browser/task_manager/task_manager.h
@@ -297,13 +297,16 @@ class TaskManagerModel : public URLRequestJobTracker::JobObserver,
const Extension* GetResourceExtension(int index) const;
// JobObserver methods:
- void OnJobAdded(net::URLRequestJob* job);
- void OnJobRemoved(net::URLRequestJob* job);
- void OnJobDone(net::URLRequestJob* job, const URLRequestStatus& status);
- void OnJobRedirect(net::URLRequestJob* job,
- const GURL& location,
- int status_code);
- void OnBytesRead(net::URLRequestJob* job, const char* buf, int byte_count);
+ virtual void OnJobAdded(net::URLRequestJob* job);
+ virtual void OnJobRemoved(net::URLRequestJob* job);
+ virtual void OnJobDone(net::URLRequestJob* job,
+ const URLRequestStatus& status);
+ virtual void OnJobRedirect(net::URLRequestJob* job,
+ const GURL& location,
+ int status_code);
+ virtual void OnBytesRead(net::URLRequestJob* job,
+ const char* buf,
+ int byte_count);
void AddResourceProvider(TaskManager::ResourceProvider* provider);
void RemoveResourceProvider(TaskManager::ResourceProvider* provider);
diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc
index e7b76e6..e4cc078 100644
--- a/chrome/browser/task_manager/task_manager_resource_providers.cc
+++ b/chrome/browser/task_manager/task_manager_resource_providers.cc
@@ -684,6 +684,14 @@ TaskManager::Resource::Type TaskManagerChildProcessResource::GetType() const {
}
}
+bool TaskManagerChildProcessResource::SupportNetworkUsage() const {
+ return network_usage_support_;
+}
+
+void TaskManagerChildProcessResource::SetSupportNetworkUsage() {
+ network_usage_support_ = true;
+}
+
////////////////////////////////////////////////////////////////////////////////
// TaskManagerChildProcessResourceProvider class
////////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/browser/task_manager/task_manager_resource_providers.h b/chrome/browser/task_manager/task_manager_resource_providers.h
index 4c61b34..cf29bc2 100644
--- a/chrome/browser/task_manager/task_manager_resource_providers.h
+++ b/chrome/browser/task_manager/task_manager_resource_providers.h
@@ -35,7 +35,7 @@ class TaskManagerRendererResource : public TaskManager::Resource {
virtual ~TaskManagerRendererResource();
// TaskManager::Resource methods:
- base::ProcessHandle GetProcess() const;
+ virtual base::ProcessHandle GetProcess() const;
virtual Type GetType() const { return RENDERER; }
virtual bool ReportsCacheStats() const { return true; }
virtual WebKit::WebCache::ResourceTypeStats GetWebCoreCacheStats() const;
@@ -44,8 +44,8 @@ class TaskManagerRendererResource : public TaskManager::Resource {
virtual size_t GetV8MemoryUsed() const;
// RenderResources always provide the network usage.
- bool SupportNetworkUsage() const { return true; }
- void SetSupportNetworkUsage() { }
+ virtual bool SupportNetworkUsage() const { return true; }
+ virtual void SetSupportNetworkUsage() { }
virtual void Refresh();
@@ -78,7 +78,7 @@ class TaskManagerRendererResource : public TaskManager::Resource {
class TaskManagerTabContentsResource : public TaskManagerRendererResource {
public:
explicit TaskManagerTabContentsResource(TabContents* tab_contents);
- ~TaskManagerTabContentsResource();
+ virtual ~TaskManagerTabContentsResource();
// TaskManager::Resource methods:
virtual Type GetType() const;
@@ -140,7 +140,7 @@ class TaskManagerBackgroundContentsResource
TaskManagerBackgroundContentsResource(
BackgroundContents* background_contents,
const std::wstring& application_name);
- ~TaskManagerBackgroundContentsResource();
+ virtual ~TaskManagerBackgroundContentsResource();
// TaskManager::Resource methods:
virtual std::wstring GetTitle() const;
@@ -208,21 +208,15 @@ class TaskManagerBackgroundContentsResourceProvider
class TaskManagerChildProcessResource : public TaskManager::Resource {
public:
explicit TaskManagerChildProcessResource(const ChildProcessInfo& child_proc);
- ~TaskManagerChildProcessResource();
+ virtual ~TaskManagerChildProcessResource();
// TaskManagerResource methods:
- std::wstring GetTitle() const;
- SkBitmap GetIcon() const;
- base::ProcessHandle GetProcess() const;
- Type GetType() const;
-
- bool SupportNetworkUsage() const {
- return network_usage_support_;
- }
-
- void SetSupportNetworkUsage() {
- network_usage_support_ = true;
- }
+ virtual std::wstring GetTitle() const;
+ virtual SkBitmap GetIcon() const;
+ virtual base::ProcessHandle GetProcess() const;
+ virtual Type GetType() const;
+ virtual bool SupportNetworkUsage() const;
+ virtual void SetSupportNetworkUsage();
// Returns the pid of the child process.
int process_id() const { return pid_; }
@@ -298,22 +292,23 @@ class TaskManagerChildProcessResourceProvider
class TaskManagerExtensionProcessResource : public TaskManager::Resource {
public:
explicit TaskManagerExtensionProcessResource(ExtensionHost* extension_host);
- ~TaskManagerExtensionProcessResource();
+ virtual ~TaskManagerExtensionProcessResource();
// TaskManagerResource methods:
- std::wstring GetTitle() const;
- SkBitmap GetIcon() const;
- base::ProcessHandle GetProcess() const;
- Type GetType() const { return EXTENSION; }
- bool SupportNetworkUsage() const { return true; }
- void SetSupportNetworkUsage() { NOTREACHED(); }
- const Extension* GetExtension() const;
+ virtual std::wstring GetTitle() const;
+ virtual SkBitmap GetIcon() const;
+ virtual base::ProcessHandle GetProcess() const;
+ virtual Type GetType() const { return EXTENSION; }
+ virtual bool SupportNetworkUsage() const { return true; }
+ virtual void SetSupportNetworkUsage() { NOTREACHED(); }
+ virtual const Extension* GetExtension() const;
// Returns the pid of the extension process.
int process_id() const { return pid_; }
// Returns true if the associated extension has a background page.
- bool IsBackground() const;
+ virtual bool IsBackground() const;
+
private:
// The icon painted for the extension process.
static SkBitmap* default_icon_;
@@ -372,13 +367,13 @@ class TaskManagerExtensionProcessResourceProvider
class TaskManagerNotificationResource : public TaskManager::Resource {
public:
explicit TaskManagerNotificationResource(BalloonHost* balloon_host);
- ~TaskManagerNotificationResource();
+ virtual ~TaskManagerNotificationResource();
// TaskManager::Resource interface
- std::wstring GetTitle() const { return title_; }
- SkBitmap GetIcon() const;
- base::ProcessHandle GetProcess() const;
- Type GetType() const { return NOTIFICATION; }
+ virtual std::wstring GetTitle() const { return title_; }
+ virtual SkBitmap GetIcon() const;
+ virtual base::ProcessHandle GetProcess() const;
+ virtual Type GetType() const { return NOTIFICATION; }
virtual bool SupportNetworkUsage() const { return false; }
virtual void SetSupportNetworkUsage() { }
@@ -437,19 +432,19 @@ class TaskManagerNotificationResourceProvider
class TaskManagerBrowserProcessResource : public TaskManager::Resource {
public:
TaskManagerBrowserProcessResource();
- ~TaskManagerBrowserProcessResource();
+ virtual ~TaskManagerBrowserProcessResource();
// TaskManagerResource methods:
- std::wstring GetTitle() const;
- SkBitmap GetIcon() const;
- base::ProcessHandle GetProcess() const;
- Type GetType() const { return BROWSER; }
+ virtual std::wstring GetTitle() const;
+ virtual SkBitmap GetIcon() const;
+ virtual base::ProcessHandle GetProcess() const;
+ virtual Type GetType() const { return BROWSER; }
- bool SupportNetworkUsage() const { return true; }
- void SetSupportNetworkUsage() { NOTREACHED(); }
+ virtual bool SupportNetworkUsage() const { return true; }
+ virtual void SetSupportNetworkUsage() { NOTREACHED(); }
- bool ReportsSqliteMemoryUsed() const { return true; }
- size_t SqliteMemoryUsedBytes() const;
+ virtual bool ReportsSqliteMemoryUsed() const { return true; }
+ virtual size_t SqliteMemoryUsedBytes() const;
// Returns the pid of the browser process.
int process_id() const { return pid_; }