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; |