| 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 f2d0155e2c6cd16dd34e57fa52d607dba6b3d2b6..8f7678a5246fb8e53b28ddf1fd3b1d4624676f5c 100644
|
| --- a/chrome/browser/component_updater/component_updater_service.cc
|
| +++ b/chrome/browser/component_updater/component_updater_service.cc
|
| @@ -255,6 +255,8 @@ class CrxUpdateService : public ComponentUpdateService {
|
| virtual Status Stop() OVERRIDE;
|
| virtual Status RegisterComponent(const CrxComponent& component) OVERRIDE;
|
| virtual Status CheckForUpdateSoon(const CrxComponent& component) OVERRIDE;
|
| + virtual bool FindRegisteredComponent(const std::vector<uint8>& pk_hash,
|
| + CrxComponent* component) OVERRIDE;
|
|
|
| // The only purpose of this class is to forward the
|
| // UtilityProcessHostClient callbacks so CrxUpdateService does
|
| @@ -499,6 +501,21 @@ ComponentUpdateService::Status CrxUpdateService::RegisterComponent(
|
| return kOk;
|
| }
|
|
|
| +bool CrxUpdateService::FindRegisteredComponent(
|
| + const std::vector<uint8>& pk_hash,
|
| + CrxComponent* component) {
|
| + std::string id =
|
| + HexStringToID(StringToLowerASCII(base::HexEncode(&pk_hash[0],
|
| + pk_hash.size()/2)));
|
| + CrxUpdateItem* uit = FindUpdateItemById(id);
|
| + if (uit) {
|
| + *component = uit->component;
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| +
|
| // Sets a component to be checked for updates.
|
| // The componet to add is |crxit| and the |query| string is modified with the
|
| // required omaha compatible query. Returns false when the query strings
|
|
|