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

Unified Diff: chrome/browser/extensions/platform_app_browsertest.cc

Issue 10113005: Remove EPM:all_hosts_ and use all_extension_views_ instead. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: interactive_ui_tests Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/platform_app_browsertest.cc
diff --git a/chrome/browser/extensions/platform_app_browsertest.cc b/chrome/browser/extensions/platform_app_browsertest.cc
index 4a2b48fbd844c995a6b4bcd2ef4a45f13c0042da..055a3101515bd4ac4a844efd63ec9a09bd82cdb8 100644
--- a/chrome/browser/extensions/platform_app_browsertest.cc
+++ b/chrome/browser/extensions/platform_app_browsertest.cc
@@ -82,18 +82,9 @@ class PlatformAppBrowserTest : public ExtensionApiTest {
// Gets the number of platform apps that are running.
size_t GetPlatformAppCount() {
- int count = 0;
ExtensionProcessManager* process_manager =
browser()->profile()->GetExtensionProcessManager();
- ExtensionProcessManager::const_iterator iter;
- for (iter = process_manager->begin(); iter != process_manager->end();
- ++iter) {
- ExtensionHost* host = *iter;
- if (host->extension() && host->extension()->is_platform_app())
- count++;
- }
-
- return count;
+ return process_manager->platform_app_hosts().size();
}
// Gets the WebContents associated with the ExtensionHost of the first
@@ -103,11 +94,11 @@ class PlatformAppBrowserTest : public ExtensionApiTest {
ExtensionProcessManager* process_manager =
browser()->profile()->GetExtensionProcessManager();
ExtensionProcessManager::const_iterator iter;
- for (iter = process_manager->begin(); iter != process_manager->end();
+ ExtensionProcessManager::ExtensionHostSet platform_app_hosts =
+ process_manager->platform_app_hosts();
+ for (iter = platform_app_hosts.begin(); iter != platform_app_hosts.end();
++iter) {
- ExtensionHost* host = *iter;
- if (host->extension() && host->extension()->is_platform_app())
- return host->host_contents();
+ return (*iter)->host_contents();
}
return NULL;

Powered by Google App Engine
This is Rietveld 408576698