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

Side by Side Diff: chrome/browser/task_manager/task_manager_resource_providers.h

Issue 6328010: Fix Task Manager to correctly display network usage of plug-in processes. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Set origin PID consistently, and only set it for plugin requests. Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ 5 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_
6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 virtual SkBitmap GetIcon() const; 439 virtual SkBitmap GetIcon() const;
440 virtual base::ProcessHandle GetProcess() const; 440 virtual base::ProcessHandle GetProcess() const;
441 virtual Type GetType() const; 441 virtual Type GetType() const;
442 442
443 virtual bool SupportNetworkUsage() const; 443 virtual bool SupportNetworkUsage() const;
444 virtual void SetSupportNetworkUsage(); 444 virtual void SetSupportNetworkUsage();
445 445
446 virtual bool ReportsSqliteMemoryUsed() const; 446 virtual bool ReportsSqliteMemoryUsed() const;
447 virtual size_t SqliteMemoryUsedBytes() const; 447 virtual size_t SqliteMemoryUsedBytes() const;
448 448
449 // Returns the pid of the browser process.
450 int process_id() const { return pid_; }
451
452 private: 449 private:
453 base::ProcessHandle process_; 450 base::ProcessHandle process_;
454 int pid_;
455 mutable std::wstring title_; 451 mutable std::wstring title_;
456 452
457 static SkBitmap* default_icon_; 453 static SkBitmap* default_icon_;
458 454
459 DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserProcessResource); 455 DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserProcessResource);
460 }; 456 };
461 457
462 class TaskManagerBrowserProcessResourceProvider 458 class TaskManagerBrowserProcessResourceProvider
463 : public TaskManager::ResourceProvider { 459 : public TaskManager::ResourceProvider {
464 public: 460 public:
(...skipping 15 matching lines...) Expand all
480 476
481 void AddToTaskManager(ChildProcessInfo child_process_info); 477 void AddToTaskManager(ChildProcessInfo child_process_info);
482 478
483 TaskManager* task_manager_; 479 TaskManager* task_manager_;
484 TaskManagerBrowserProcessResource resource_; 480 TaskManagerBrowserProcessResource resource_;
485 481
486 DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserProcessResourceProvider); 482 DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserProcessResourceProvider);
487 }; 483 };
488 484
489 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ 485 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698