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

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

Issue 2711593006: Report built_in_version to Omaha for Flash updates. (Closed)
Patch Set: Report built_in_version to Omaha for Flash updates. Created 3 years, 10 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 void FlashComponentInstallerTraits::GetHash(std::vector<uint8_t>* hash) const { 334 void FlashComponentInstallerTraits::GetHash(std::vector<uint8_t>* hash) const {
335 hash->assign(kSha2Hash, kSha2Hash + arraysize(kSha2Hash)); 335 hash->assign(kSha2Hash, kSha2Hash + arraysize(kSha2Hash));
336 } 336 }
337 337
338 std::string FlashComponentInstallerTraits::GetName() const { 338 std::string FlashComponentInstallerTraits::GetName() const {
339 return "Adobe Flash Player"; 339 return "Adobe Flash Player";
340 } 340 }
341 341
342 update_client::InstallerAttributes 342 update_client::InstallerAttributes
343 FlashComponentInstallerTraits::GetInstallerAttributes() const { 343 FlashComponentInstallerTraits::GetInstallerAttributes() const {
344 return update_client::InstallerAttributes(); 344 // For Chrome OS, send the built-in flash player version to the server,
345 // otherwise it will serve component updates of outdated flash players.
346 update_client::InstallerAttributes attrs;
347 #if defined(OS_CHROMEOS)
348 const std::string flash_version =
349 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
350 switches::kPpapiFlashVersion);
351 attrs["built_in_version"] = flash_version;
352 #endif // #defined(OS_CHROMEOS)
353 return attrs;
345 } 354 }
346 355
347 std::vector<std::string> FlashComponentInstallerTraits::GetMimeTypes() const { 356 std::vector<std::string> FlashComponentInstallerTraits::GetMimeTypes() const {
348 std::vector<std::string> mime_types; 357 std::vector<std::string> mime_types;
349 mime_types.push_back("application/x-shockwave-flash"); 358 mime_types.push_back("application/x-shockwave-flash");
350 mime_types.push_back("application/futuresplash"); 359 mime_types.push_back("application/futuresplash");
351 return mime_types; 360 return mime_types;
352 } 361 }
353 #endif // defined(GOOGLE_CHROME_BUILD) 362 #endif // defined(GOOGLE_CHROME_BUILD)
354 363
(...skipping 15 matching lines...) Expand all
370 std::unique_ptr<ComponentInstallerTraits> traits( 379 std::unique_ptr<ComponentInstallerTraits> traits(
371 new FlashComponentInstallerTraits); 380 new FlashComponentInstallerTraits);
372 // |cus| will take ownership of |installer| during installer->Register(cus). 381 // |cus| will take ownership of |installer| during installer->Register(cus).
373 DefaultComponentInstaller* installer = 382 DefaultComponentInstaller* installer =
374 new DefaultComponentInstaller(std::move(traits)); 383 new DefaultComponentInstaller(std::move(traits));
375 installer->Register(cus, base::Closure()); 384 installer->Register(cus, base::Closure());
376 #endif // defined(GOOGLE_CHROME_BUILD) 385 #endif // defined(GOOGLE_CHROME_BUILD)
377 } 386 }
378 387
379 } // namespace component_updater 388 } // 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