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