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

Side by Side Diff: chrome/browser/task_manager/task_manager.cc

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_manager/task_manager.h" 5 #include "chrome/browser/task_manager/task_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/i18n/number_formatting.h" 9 #include "base/i18n/number_formatting.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 TaskManager::Resource::Type TaskManagerModel::GetResourceType(int index) const { 479 TaskManager::Resource::Type TaskManagerModel::GetResourceType(int index) const {
480 CHECK_LT(index, ResourceCount()); 480 CHECK_LT(index, ResourceCount());
481 return resources_[index]->GetType(); 481 return resources_[index]->GetType();
482 } 482 }
483 483
484 TabContentsWrapper* TaskManagerModel::GetResourceTabContents(int index) const { 484 TabContentsWrapper* TaskManagerModel::GetResourceTabContents(int index) const {
485 CHECK_LT(index, ResourceCount()); 485 CHECK_LT(index, ResourceCount());
486 return resources_[index]->GetTabContents(); 486 return resources_[index]->GetTabContents();
487 } 487 }
488 488
489 const Extension* TaskManagerModel::GetResourceExtension(int index) const { 489 const extensions::Extension* TaskManagerModel::GetResourceExtension(
490 int index) const {
490 CHECK_LT(index, ResourceCount()); 491 CHECK_LT(index, ResourceCount());
491 return resources_[index]->GetExtension(); 492 return resources_[index]->GetExtension();
492 } 493 }
493 494
494 int64 TaskManagerModel::GetNetworkUsage(TaskManager::Resource* resource) 495 int64 TaskManagerModel::GetNetworkUsage(TaskManager::Resource* resource)
495 const { 496 const {
496 int64 net_usage = GetNetworkUsageForResource(resource); 497 int64 net_usage = GetNetworkUsageForResource(resource);
497 if (net_usage == 0 && !resource->SupportNetworkUsage()) 498 if (net_usage == 0 && !resource->SupportNetworkUsage())
498 return -1; 499 return -1;
499 return net_usage; 500 return net_usage;
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 // Count the number of extensions with background pages (including 1213 // Count the number of extensions with background pages (including
1213 // incognito). 1214 // incognito).
1214 count += CountExtensionBackgroundPagesForProfile(profile); 1215 count += CountExtensionBackgroundPagesForProfile(profile);
1215 if (profile->HasOffTheRecordProfile()) { 1216 if (profile->HasOffTheRecordProfile()) {
1216 count += CountExtensionBackgroundPagesForProfile( 1217 count += CountExtensionBackgroundPagesForProfile(
1217 profile->GetOffTheRecordProfile()); 1218 profile->GetOffTheRecordProfile());
1218 } 1219 }
1219 } 1220 }
1220 return count; 1221 return count;
1221 } 1222 }
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager.h ('k') | chrome/browser/task_manager/task_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698