| OLD | NEW |
| 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 // <profile>\AppData\Local\Google\Chrome\User Data\PepperFlash\. | 240 // <profile>\AppData\Local\Google\Chrome\User Data\PepperFlash\. |
| 241 base::FilePath FlashComponentInstallerTraits::GetRelativeInstallDir() const { | 241 base::FilePath FlashComponentInstallerTraits::GetRelativeInstallDir() const { |
| 242 return base::FilePath(FILE_PATH_LITERAL("PepperFlash")); | 242 return base::FilePath(FILE_PATH_LITERAL("PepperFlash")); |
| 243 } | 243 } |
| 244 | 244 |
| 245 void FlashComponentInstallerTraits::GetHash(std::vector<uint8_t>* hash) const { | 245 void FlashComponentInstallerTraits::GetHash(std::vector<uint8_t>* hash) const { |
| 246 hash->assign(kSha2Hash, kSha2Hash + arraysize(kSha2Hash)); | 246 hash->assign(kSha2Hash, kSha2Hash + arraysize(kSha2Hash)); |
| 247 } | 247 } |
| 248 | 248 |
| 249 std::string FlashComponentInstallerTraits::GetName() const { | 249 std::string FlashComponentInstallerTraits::GetName() const { |
| 250 return "pepper_flash"; | 250 return "Adobe Flash Player"; |
| 251 } | 251 } |
| 252 | 252 |
| 253 update_client::InstallerAttributes | 253 update_client::InstallerAttributes |
| 254 FlashComponentInstallerTraits::GetInstallerAttributes() const { | 254 FlashComponentInstallerTraits::GetInstallerAttributes() const { |
| 255 return update_client::InstallerAttributes(); | 255 return update_client::InstallerAttributes(); |
| 256 } | 256 } |
| 257 | 257 |
| 258 std::vector<std::string> FlashComponentInstallerTraits::GetMimeTypes() const { | 258 std::vector<std::string> FlashComponentInstallerTraits::GetMimeTypes() const { |
| 259 std::vector<std::string> mime_types; | 259 std::vector<std::string> mime_types; |
| 260 mime_types.push_back("application/x-shockwave-flash"); | 260 mime_types.push_back("application/x-shockwave-flash"); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 275 std::unique_ptr<ComponentInstallerTraits> traits( | 275 std::unique_ptr<ComponentInstallerTraits> traits( |
| 276 new FlashComponentInstallerTraits); | 276 new FlashComponentInstallerTraits); |
| 277 // |cus| will take ownership of |installer| during installer->Register(cus). | 277 // |cus| will take ownership of |installer| during installer->Register(cus). |
| 278 DefaultComponentInstaller* installer = | 278 DefaultComponentInstaller* installer = |
| 279 new DefaultComponentInstaller(std::move(traits)); | 279 new DefaultComponentInstaller(std::move(traits)); |
| 280 installer->Register(cus, base::Closure()); | 280 installer->Register(cus, base::Closure()); |
| 281 #endif // defined(GOOGLE_CHROME_BUILD) | 281 #endif // defined(GOOGLE_CHROME_BUILD) |
| 282 } | 282 } |
| 283 | 283 |
| 284 } // namespace component_updater | 284 } // namespace component_updater |
| OLD | NEW |