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

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

Issue 8822021: Revert 113071 - 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_updater_unittest.cc
===================================================================
--- chrome/browser/extensions/extension_updater_unittest.cc (revision 113231)
+++ chrome/browser/extensions/extension_updater_unittest.cc (working copy)
@@ -153,16 +153,10 @@
virtual const Extension* GetExtensionById(
const std::string& id, bool include_disabled) const OVERRIDE {
- for (ExtensionList::const_iterator iter = extensions_.begin();
- iter != extensions_.end(); ++iter) {
- if ((*iter)->id() == id) {
- return *iter;
- }
- }
- return NULL;
+ return extensions_.GetByID(id);
}
- virtual const ExtensionList* extensions() const OVERRIDE {
+ virtual const ExtensionSet* extensions() const OVERRIDE {
return &extensions_;
}
@@ -171,11 +165,14 @@
}
void set_extensions(ExtensionList extensions) {
- extensions_ = extensions;
+ for (ExtensionList::const_iterator it = extensions.begin();
+ it != extensions.end(); ++it) {
+ extensions_.Insert(*it);
+ }
}
private:
- ExtensionList extensions_;
+ ExtensionSet extensions_;
};
class ServiceForDownloadTests : public MockService {
« no previous file with comments | « chrome/browser/extensions/extension_updater.cc ('k') | chrome/browser/extensions/extension_webrequest_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698