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

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: Comments addressed 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 f0354e72d6f7d0a05334a5bb1ec1a7096085224b..41b5a5142dd0b85d09449a569b2e7abd36cc40c1 100644
--- a/chrome/browser/extensions/platform_app_browsertest.cc
+++ b/chrome/browser/extensions/platform_app_browsertest.cc
@@ -87,10 +87,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())
+ if ((*iter)->extension())
count++;
}
@@ -104,12 +105,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() &&
- host->extension_host_type() == chrome::VIEW_TYPE_APP_SHELL)
- return host->host_contents();
+ return (*iter)->host_contents();
}
return NULL;

Powered by Google App Engine
This is Rietveld 408576698