Chromium Code Reviews| 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 804885582df9a2b4c893b5fc161e377c760fa879..fb709a1739e6ffad5d3e638652a4be275d97d189 100644 |
| --- a/chrome/browser/component_updater/component_updater_service.cc |
| +++ b/chrome/browser/component_updater/component_updater_service.cc |
| @@ -311,6 +311,9 @@ class CrxUpdateService : public ComponentUpdateService { |
| virtual Status Stop() OVERRIDE; |
| virtual Status RegisterComponent(const CrxComponent& component) OVERRIDE; |
| virtual Status CheckForUpdateSoon(const CrxComponent& component) OVERRIDE; |
| + virtual bool IsUpdateNotificationForComponent( |
| + const content::NotificationSource& source, |
| + const CrxComponent& component) OVERRIDE; |
| // The only purpose of this class is to forward the |
| // UtilityProcessHostClient callbacks so CrxUpdateService does |
| @@ -984,6 +987,15 @@ void CrxUpdateService::DoneInstalling(const std::string& component_id, |
| ScheduleNextRun(false); |
| } |
| +bool CrxUpdateService::IsUpdateNotificationForComponent( |
|
Sorin Jianu
2013/07/03 23:10:04
What is strange about this function is that is see
jvoung (off chromium)
2013/07/04 01:11:04
One argument for having it be a member function, i
|
| + 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<std::string>(src)->compare(id) == 0; |
| +} |
| + |
| // The component update factory. Using the component updater as a singleton |
| // is the job of the browser process. |
| ComponentUpdateService* ComponentUpdateServiceFactory( |