| Index: components/update_client/utils.h
|
| diff --git a/components/update_client/utils.h b/components/update_client/utils.h
|
| index 2306cf2a8373dcd29c8275df896700e5bf315fc7..f800b4fb895c443c0f5ac3b1b83d4a8f92e1d370 100644
|
| --- a/components/update_client/utils.h
|
| +++ b/components/update_client/utils.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include <memory>
|
| #include <string>
|
| +#include <utility>
|
| #include <vector>
|
|
|
|
|
| @@ -28,6 +29,11 @@ class Configurator;
|
| struct CrxComponent;
|
| struct CrxUpdateItem;
|
|
|
| +// Defines a name-value pair that represents an installer attribute.
|
| +// Installer attributes are component-specific metadata, which may be serialized
|
| +// in an update check request.
|
| +using InstallerAttribute = std::pair<std::string, std::string>;
|
| +
|
| // An update protocol request starts with a common preamble which includes
|
| // version and platform information for Chrome and the operating system,
|
| // followed by a request body, which is the actual payload of the request.
|
| @@ -99,8 +105,10 @@ bool VerifyFileHash256(const base::FilePath& filepath,
|
| // Returns true if the |brand| parameter matches ^[a-zA-Z]{4}?$ .
|
| bool IsValidBrand(const std::string& brand);
|
|
|
| -// Returns true if the |ap| parameter matches ^[-+_=a-zA-Z0-9]{0,256}$ .
|
| -bool IsValidAp(const std::string& ap);
|
| +// Returns true if the name part of the |attr| parameter matches
|
| +// ^[-_a-zA-Z0-9]{1,256}$ and the value part of the |attr| parameter
|
| +// matches ^[-.,;+_=a-zA-Z0-9]{0,256}$ .
|
| +bool IsValidInstallerAttribute(const InstallerAttribute& attr);
|
|
|
| // Removes the unsecure urls in the |urls| parameter.
|
| void RemoveUnsecureUrls(std::vector<GURL>* urls);
|
|
|