| Index: content/renderer/manifest/manifest_parser.h
|
| diff --git a/content/renderer/manifest/manifest_parser.h b/content/renderer/manifest/manifest_parser.h
|
| index 2c8d2076e33075824469ae3e04ead46d83515387..8be1d5d06cdc415b63df512ab943bbc3df803126 100644
|
| --- a/content/renderer/manifest/manifest_parser.h
|
| +++ b/content/renderer/manifest/manifest_parser.h
|
| @@ -66,10 +66,10 @@ class CONTENT_EXPORT ManifestParser {
|
|
|
| // Helper function to parse colors present on a given |dictionary| in a given
|
| // field identified by its |key|.
|
| - // Returns the parsed color as an int64_t if any,
|
| - // Manifest::kInvalidOrMissingColor if the parsing failed.
|
| - int64_t ParseColor(const base::DictionaryValue& dictionary,
|
| - const std::string& key);
|
| + // Returns the parsed color as Optional<SkColor>; if the parsing failed, the
|
| + // Optional<> will be empty.
|
| + base::Optional<SkColor> ParseColor(const base::DictionaryValue& dictionary,
|
| + const std::string& key);
|
|
|
| // Helper function to parse URLs present on a given |dictionary| in a given
|
| // field identified by its |key|. The URL is first parsed as a string then
|
| @@ -171,15 +171,17 @@ class CONTENT_EXPORT ManifestParser {
|
|
|
| // Parses the 'theme_color' field of the manifest, as defined in:
|
| // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-theme_color-member
|
| - // Returns the parsed theme color if any,
|
| - // Manifest::kInvalidOrMissingColor if the parsing failed.
|
| - int64_t ParseThemeColor(const base::DictionaryValue& dictionary);
|
| + // Returns the parsed theme color wrapped in an Optional<> if any, empty
|
| + // Optional<> if the parsing failed.
|
| + base::Optional<SkColor> ParseThemeColor(
|
| + const base::DictionaryValue& dictionary);
|
|
|
| // Parses the 'background_color' field of the manifest, as defined in:
|
| // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-background_color-member
|
| - // Returns the parsed background color if any,
|
| - // Manifest::kInvalidOrMissingColor if the parsing failed.
|
| - int64_t ParseBackgroundColor(const base::DictionaryValue& dictionary);
|
| + // Returns the parsed background color wrapped in an Optional<> if any, empty
|
| + // Optional<> if the parsing failed.
|
| + base::Optional<SkColor> ParseBackgroundColor(
|
| + const base::DictionaryValue& dictionary);
|
|
|
| // Parses the 'gcm_sender_id' field of the manifest.
|
| // This is a proprietary extension of the Web Manifest specification.
|
|
|