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

Unified Diff: chrome/test/live_sync/live_extensions_sync_test_base.cc

Issue 5000002: [Sync] Fix modification-while-iterating bug in extensions integration tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/live_sync/live_extensions_sync_test_base.cc
diff --git a/chrome/test/live_sync/live_extensions_sync_test_base.cc b/chrome/test/live_sync/live_extensions_sync_test_base.cc
index 154ef18e2a6ee158fac9f1e3d48bb7444aca4246..1eb040e5e9b5c261b45c7ac59ea528421625ad2e 100644
--- a/chrome/test/live_sync/live_extensions_sync_test_base.cc
+++ b/chrome/test/live_sync/live_extensions_sync_test_base.cc
@@ -111,7 +111,10 @@ void LiveExtensionsSyncTestBase::InstallAllPendingExtensions(
// TODO(akalin): Mock out the servers that the extensions
// auto-update mechanism talk to so as to more closely match what
// actually happens.
- const PendingExtensionMap& pending_extensions =
+
+ // We make a copy here since InstallExtension() removes the
+ // extension from the extensions service's copy.
+ PendingExtensionMap pending_extensions =
profile->GetExtensionsService()->pending_extensions();
for (PendingExtensionMap::const_iterator it = pending_extensions.begin();
it != pending_extensions.end(); ++it) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698