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

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

Issue 8587001: Have ExtensionHost use TabContents instead of RenderViewHost. Try #3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/i18n/number_formatting.h" 8 #include "base/i18n/number_formatting.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 1102
1103 // Counts the number of extension background pages associated with this profile. 1103 // Counts the number of extension background pages associated with this profile.
1104 int CountExtensionBackgroundPagesForProfile(Profile* profile) { 1104 int CountExtensionBackgroundPagesForProfile(Profile* profile) {
1105 int count = 0; 1105 int count = 0;
1106 ExtensionProcessManager* manager = profile->GetExtensionProcessManager(); 1106 ExtensionProcessManager* manager = profile->GetExtensionProcessManager();
1107 if (!manager) 1107 if (!manager)
1108 return count; 1108 return count;
1109 for (ExtensionProcessManager::const_iterator iter = manager->begin(); 1109 for (ExtensionProcessManager::const_iterator iter = manager->begin();
1110 iter != manager->end(); 1110 iter != manager->end();
1111 ++iter) { 1111 ++iter) {
1112 if ((*iter)->GetRenderViewType() == 1112 if ((*iter)->extension_host_type() ==
1113 chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) { 1113 chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) {
1114 count++; 1114 count++;
1115 } 1115 }
1116 } 1116 }
1117 return count; 1117 return count;
1118 } 1118 }
1119 1119
1120 } // namespace 1120 } // namespace
1121 1121
1122 // static 1122 // static
(...skipping 18 matching lines...) Expand all
1141 // Count the number of extensions with background pages (including 1141 // Count the number of extensions with background pages (including
1142 // incognito). 1142 // incognito).
1143 count += CountExtensionBackgroundPagesForProfile(profile); 1143 count += CountExtensionBackgroundPagesForProfile(profile);
1144 if (profile->HasOffTheRecordProfile()) { 1144 if (profile->HasOffTheRecordProfile()) {
1145 count += CountExtensionBackgroundPagesForProfile( 1145 count += CountExtensionBackgroundPagesForProfile(
1146 profile->GetOffTheRecordProfile()); 1146 profile->GetOffTheRecordProfile());
1147 } 1147 }
1148 } 1148 }
1149 return count; 1149 return count;
1150 } 1150 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698