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

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

Issue 15010: Implement extension:// protocol. (Closed)
Patch Set: add missing unit test Created 12 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
« no previous file with comments | « chrome/browser/extensions/extension_protocol_unittest.cc ('k') | chrome/browser/greasemonkey_master.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extensions_service.cc
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 0245ce601b05d8ece4b16a67fd0077ef3a03c6b8..cd0397ca6b27860f4033a47127cb79744c2ec03a 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -10,6 +10,7 @@
#include "base/thread.h"
#include "chrome/browser/browser_process.h"
#include "chrome/common/json_value_serializer.h"
+#include "chrome/common/notification_service.h"
// ExtensionsService
@@ -51,9 +52,12 @@ void ExtensionsService::OnExtensionsLoadedFromDirectory(
ExtensionList* new_extensions) {
extensions_.insert(extensions_.end(), new_extensions->begin(),
new_extensions->end());
- delete new_extensions;
- // TODO(aa): Notify extensions are loaded.
+ NotificationService::current()->Notify(NOTIFY_EXTENSIONS_LOADED,
+ NotificationService::AllSources(),
+ Details<ExtensionList>(new_extensions));
+
+ delete new_extensions;
}
void ExtensionsService::OnExtensionLoadError(const std::string& error) {
@@ -99,7 +103,7 @@ bool ExtensionsServiceBackend::LoadExtensionsFromDirectory(
continue;
}
- scoped_ptr<Extension> extension(new Extension());
+ scoped_ptr<Extension> extension(new Extension(child_path));
if (!extension->InitFromValue(*static_cast<DictionaryValue*>(root),
&error)) {
ReportExtensionLoadError(frontend.get(), child_path.ToWStringHack(),
« no previous file with comments | « chrome/browser/extensions/extension_protocol_unittest.cc ('k') | chrome/browser/greasemonkey_master.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698