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

Unified Diff: chrome/browser/sync/test/integration/apps_helper.cc

Issue 11299326: Revert 170660 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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/sync/test/integration/apps_helper.cc
===================================================================
--- chrome/browser/sync/test/integration/apps_helper.cc (revision 170888)
+++ chrome/browser/sync/test/integration/apps_helper.cc (working copy)
@@ -6,14 +6,11 @@
#include "base/logging.h"
#include "base/string_number_conversions.h"
-#include "chrome/browser/extensions/extension_process_manager.h"
-#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/test/integration/sync_app_helper.h"
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
#include "chrome/browser/sync/test/integration/sync_extension_helper.h"
#include "chrome/common/extensions/extension.h"
-#include "content/public/test/test_utils.h"
using sync_datatype_helper::test;
@@ -23,19 +20,6 @@
return "fakeapp" + base::IntToString(index);
}
-void WaitForPlatformAppsToUnloadForProfile(Profile* profile) {
- // Note this will hang if there are extensions with persistent background
- // pages loaded.
- ExtensionProcessManager* pm =
- extensions::ExtensionSystem::Get(profile)->process_manager();
- while (!pm->background_hosts().empty()) {
- content::WindowedNotificationObserver destroyed_observer(
- chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED,
- content::NotificationService::AllSources());
- destroyed_observer.Wait();
- }
-}
-
} // namespace
namespace apps_helper {
@@ -142,13 +126,4 @@
SyncAppHelper::GetInstance()->FixNTPOrdinalCollisions(profile);
}
-void WaitForPlatformAppsToUnload() {
- // First run any pending tasks to allow any about to load background
- // pages to load.
- MessageLoop::current()->RunUntilIdle();
- for (int i = 0; i < test()->num_clients(); ++i)
- WaitForPlatformAppsToUnloadForProfile(test()->GetProfile(i));
- WaitForPlatformAppsToUnloadForProfile(test()->verifier());
-}
-
} // namespace apps_helper

Powered by Google App Engine
This is Rietveld 408576698