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

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

Issue 8789018: Revert 113047 - Make ExtensionService use ExtensionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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/extensions/extension_browsertest.cc
===================================================================
--- chrome/browser/extensions/extension_browsertest.cc (revision 113069)
+++ chrome/browser/extensions/extension_browsertest.cc (working copy)
@@ -72,13 +72,13 @@
ui_test_utils::RunMessageLoop();
}
- // Find the loaded extension by its path. See crbug.com/59531 for why
- // we cannot just use last_loaded_extension_id_.
+ // Find the extension by iterating backwards since it is likely last.
FilePath extension_path = path;
file_util::AbsolutePath(&extension_path);
const Extension* extension = NULL;
- for (ExtensionSet::const_iterator iter = service->extensions()->begin();
- iter != service->extensions()->end(); ++iter) {
+ for (ExtensionList::const_reverse_iterator iter =
+ service->extensions()->rbegin();
+ iter != service->extensions()->rend(); ++iter) {
if ((*iter)->path() == extension_path) {
extension = *iter;
break;
@@ -296,9 +296,8 @@
<< " num after: " << base::IntToString(num_after)
<< " Installed extensions follow:";
- for (ExtensionSet::const_iterator it = service->extensions()->begin();
- it != service->extensions()->end(); ++it)
- VLOG(1) << " " << (*it)->id();
+ for (size_t i = 0; i < service->extensions()->size(); ++i)
+ VLOG(1) << " " << (*service->extensions())[i]->id();
VLOG(1) << "Errors follow:";
const std::vector<std::string>* errors =
« no previous file with comments | « chrome/browser/extensions/extension_apitest.cc ('k') | chrome/browser/extensions/extension_browsertests_misc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698