Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: chrome/browser/component_updater/pepper_flash_component_installer.cc

Issue 2724523002: Report built_in_version to Omaha for Flash updates. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/component_updater/pepper_flash_component_installer.h" 5 #include "chrome/browser/component_updater/pepper_flash_component_installer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 void FlashComponentInstallerTraits::GetHash(std::vector<uint8_t>* hash) const { 333 void FlashComponentInstallerTraits::GetHash(std::vector<uint8_t>* hash) const {
334 hash->assign(kSha2Hash, kSha2Hash + arraysize(kSha2Hash)); 334 hash->assign(kSha2Hash, kSha2Hash + arraysize(kSha2Hash));
335 } 335 }
336 336
337 std::string FlashComponentInstallerTraits::GetName() const { 337 std::string FlashComponentInstallerTraits::GetName() const {
338 return "Adobe Flash Player"; 338 return "Adobe Flash Player";
339 } 339 }
340 340
341 update_client::InstallerAttributes 341 update_client::InstallerAttributes
342 FlashComponentInstallerTraits::GetInstallerAttributes() const { 342 FlashComponentInstallerTraits::GetInstallerAttributes() const {
343 return update_client::InstallerAttributes(); 343 // For Chrome OS, send the built-in flash player version to the server,
344 // otherwise it will serve component updates of outdated flash players.
345 update_client::InstallerAttributes attrs;
346 #if defined(OS_CHROMEOS)
347 const std::string flash_version =
348 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
349 switches::kPpapiFlashVersion);
350 attrs["built_in_version"] = flash_version;
351 #endif // #defined(OS_CHROMEOS)
352 return attrs;
344 } 353 }
345 354
346 std::vector<std::string> FlashComponentInstallerTraits::GetMimeTypes() const { 355 std::vector<std::string> FlashComponentInstallerTraits::GetMimeTypes() const {
347 std::vector<std::string> mime_types; 356 std::vector<std::string> mime_types;
348 mime_types.push_back("application/x-shockwave-flash"); 357 mime_types.push_back("application/x-shockwave-flash");
349 mime_types.push_back("application/futuresplash"); 358 mime_types.push_back("application/futuresplash");
350 return mime_types; 359 return mime_types;
351 } 360 }
352 #endif // defined(GOOGLE_CHROME_BUILD) 361 #endif // defined(GOOGLE_CHROME_BUILD)
353 362
(...skipping 15 matching lines...) Expand all
369 std::unique_ptr<ComponentInstallerTraits> traits( 378 std::unique_ptr<ComponentInstallerTraits> traits(
370 new FlashComponentInstallerTraits); 379 new FlashComponentInstallerTraits);
371 // |cus| will take ownership of |installer| during installer->Register(cus). 380 // |cus| will take ownership of |installer| during installer->Register(cus).
372 DefaultComponentInstaller* installer = 381 DefaultComponentInstaller* installer =
373 new DefaultComponentInstaller(std::move(traits)); 382 new DefaultComponentInstaller(std::move(traits));
374 installer->Register(cus, base::Closure()); 383 installer->Register(cus, base::Closure());
375 #endif // defined(GOOGLE_CHROME_BUILD) 384 #endif // defined(GOOGLE_CHROME_BUILD)
376 } 385 }
377 386
378 } // namespace component_updater 387 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698