Chromium Code Reviews| Index: chrome/browser/component_updater/pepper_flash_component_installer.cc |
| diff --git a/chrome/browser/component_updater/pepper_flash_component_installer.cc b/chrome/browser/component_updater/pepper_flash_component_installer.cc |
| index 086d405ddd8b4925401485619d0c20ab26ca184d..c049b30dff947ada0b27e6e3a63c434cd9ded53b 100644 |
| --- a/chrome/browser/component_updater/pepper_flash_component_installer.cc |
| +++ b/chrome/browser/component_updater/pepper_flash_component_installer.cc |
| @@ -341,7 +341,19 @@ std::string FlashComponentInstallerTraits::GetName() const { |
| update_client::InstallerAttributes |
| FlashComponentInstallerTraits::GetInstallerAttributes() const { |
| - return update_client::InstallerAttributes(); |
| + // For Chrome OS, send the built-in flash player version to the server, |
| + // otherwise it will serve component updates of outdated flash players. |
| + update_client::InstallerAttributes attrs = |
| + update_client::InstallerAttributes(); |
| +#if defined(OS_CHROMEOS) |
| + std::string flash_version = |
| + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| + switches::kPpapiFlashVersion); |
| + bool did_insert = |
| + attrs.insert(std::make_pair("built_in_version", flash_version)).second; |
|
waffles
2017/02/24 18:35:51
Will this generated an unused variable warning in
Greg K
2017/02/24 19:03:59
That's a fair point, let's do the DCHECK() directl
|
| + DCHECK(did_insert); |
| +#endif // #defined(OS_CHROMEOS) |
| + return attrs; |
| } |
| std::vector<std::string> FlashComponentInstallerTraits::GetMimeTypes() const { |