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

Unified Diff: chrome/browser/sync/glue/extension_change_processor.cc

Issue 5968009: Change extension unload notification to indicate updates.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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/sync/glue/extension_change_processor.cc
===================================================================
--- chrome/browser/sync/glue/extension_change_processor.cc (revision 69996)
+++ chrome/browser/sync/glue/extension_change_processor.cc (working copy)
@@ -49,8 +49,7 @@
(type != NotificationType::EXTENSION_UNINSTALLED) &&
(type != NotificationType::EXTENSION_LOADED) &&
(type != NotificationType::EXTENSION_UPDATE_DISABLED) &&
- (type != NotificationType::EXTENSION_UNLOADED) &&
- (type != NotificationType::EXTENSION_UNLOADED_DISABLED)) {
+ (type != NotificationType::EXTENSION_UNLOADED)) {
LOG(DFATAL) << "Received unexpected notification of type "
<< type.value;
return;
@@ -69,7 +68,12 @@
RemoveServerData(traits_, id, profile_->GetProfileSyncService());
}
} else {
- const Extension* extension = Details<const Extension>(details).ptr();
+ const Extension* extension = NULL;
+ if (type == NotificationType::EXTENSION_UNLOADED) {
+ extension = Details<UnloadedExtensionInfo>(details)->extension;
+ } else {
+ extension = Details<const Extension>(details).ptr();
+ }
CHECK(extension);
VLOG(1) << "Updating server data for extension " << extension->id()
<< " (notification type = " << type.value << ")";
@@ -177,9 +181,6 @@
notification_registrar_.Add(
this, NotificationType::EXTENSION_UNLOADED,
Source<Profile>(profile_));
- notification_registrar_.Add(
- this, NotificationType::EXTENSION_UNLOADED_DISABLED,
- Source<Profile>(profile_));
}
void ExtensionChangeProcessor::StopObserving() {

Powered by Google App Engine
This is Rietveld 408576698