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

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 2 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 TaskManager::Resource::Type TaskManagerModel::GetResourceType(int index) const { 472 TaskManager::Resource::Type TaskManagerModel::GetResourceType(int index) const {
473 CHECK_LT(index, ResourceCount()); 473 CHECK_LT(index, ResourceCount());
474 return resources_[index]->GetType(); 474 return resources_[index]->GetType();
475 } 475 }
476 476
477 TabContentsWrapper* TaskManagerModel::GetResourceTabContents(int index) const { 477 TabContentsWrapper* TaskManagerModel::GetResourceTabContents(int index) const {
478 CHECK_LT(index, ResourceCount()); 478 CHECK_LT(index, ResourceCount());
479 return resources_[index]->GetTabContents(); 479 return resources_[index]->GetTabContents();
480 } 480 }
481 481
482 const Extension* TaskManagerModel::GetResourceExtension(int index) const { 482 const extensions::Extension* TaskManagerModel::GetResourceExtension(
483 int index) const {
483 CHECK_LT(index, ResourceCount()); 484 CHECK_LT(index, ResourceCount());
484 return resources_[index]->GetExtension(); 485 return resources_[index]->GetExtension();
485 } 486 }
486 487
487 int64 TaskManagerModel::GetNetworkUsage(TaskManager::Resource* resource) 488 int64 TaskManagerModel::GetNetworkUsage(TaskManager::Resource* resource)
488 const { 489 const {
489 int64 net_usage = GetNetworkUsageForResource(resource); 490 int64 net_usage = GetNetworkUsageForResource(resource);
490 if (net_usage == 0 && !resource->SupportNetworkUsage()) 491 if (net_usage == 0 && !resource->SupportNetworkUsage())
491 return -1; 492 return -1;
492 return net_usage; 493 return net_usage;
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 // Count the number of extensions with background pages (including 1166 // Count the number of extensions with background pages (including
1166 // incognito). 1167 // incognito).
1167 count += CountExtensionBackgroundPagesForProfile(profile); 1168 count += CountExtensionBackgroundPagesForProfile(profile);
1168 if (profile->HasOffTheRecordProfile()) { 1169 if (profile->HasOffTheRecordProfile()) {
1169 count += CountExtensionBackgroundPagesForProfile( 1170 count += CountExtensionBackgroundPagesForProfile(
1170 profile->GetOffTheRecordProfile()); 1171 profile->GetOffTheRecordProfile());
1171 } 1172 }
1172 } 1173 }
1173 return count; 1174 return count;
1174 } 1175 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698