Index: chrome/browser/component_updater/component_updater_service.cc |
diff --git a/chrome/browser/component_updater/component_updater_service.cc b/chrome/browser/component_updater/component_updater_service.cc |
index 6be2c039fe7ae8904d7ba35498cf04c7f8e3aea2..09c61c131297708f7bda03205adc9710a96d79e7 100644 |
--- a/chrome/browser/component_updater/component_updater_service.cc |
+++ b/chrome/browser/component_updater/component_updater_service.cc |
@@ -853,7 +853,7 @@ void CrxUpdateService::OnParseUpdateManifestSucceeded( |
content::NotificationService::current()->Notify( |
chrome::NOTIFICATION_COMPONENT_UPDATE_FOUND, |
- content::Source<std::string>(&crx->id), |
+ content::Source<UpdateSource>(&crx->id), |
content::NotificationService::NoDetails()); |
} |
@@ -921,7 +921,7 @@ void CrxUpdateService::OnURLFetchComplete(const net::URLFetcher* source, |
content::NotificationService::current()->Notify( |
chrome::NOTIFICATION_COMPONENT_UPDATE_READY, |
- content::Source<std::string>(&context->id), |
+ content::Source<UpdateSource>(&context->id), |
content::NotificationService::NoDetails()); |
// Why unretained? See comment at top of file. |
@@ -1004,6 +1004,15 @@ void CrxUpdateService::DoneInstalling(const std::string& component_id, |
ScheduleNextRun(false); |
} |
+bool ComponentUpdateService::IsUpdateNotificationForComponent( |
+ const content::NotificationSource& src, |
+ const CrxComponent& component) { |
+ std::string id = |
+ HexStringToID(StringToLowerASCII(base::HexEncode(&component.pk_hash[0], |
+ component.pk_hash.size()/2))); |
+ return content::Source<UpdateSource>(src)->compare(id) == 0; |
+} |
+ |
// The component update factory. Using the component updater as a singleton |
// is the job of the browser process. |
ComponentUpdateService* ComponentUpdateServiceFactory( |