| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 PluginService::GetInstance()->RegisterInternalPlugin( | 161 PluginService::GetInstance()->RegisterInternalPlugin( |
| 162 plugin_info.ToWebPluginInfo(), true); | 162 plugin_info.ToWebPluginInfo(), true); |
| 163 PluginService::GetInstance()->RefreshPlugins(); | 163 PluginService::GetInstance()->RefreshPlugins(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 void NotifyPathServiceAndChrome(const base::FilePath& path, | 166 void NotifyPathServiceAndChrome(const base::FilePath& path, |
| 167 const Version& version) { | 167 const Version& version) { |
| 168 PathService::Override(chrome::DIR_PEPPER_FLASH_PLUGIN, path); | 168 PathService::Override(chrome::DIR_PEPPER_FLASH_PLUGIN, path); |
| 169 BrowserThread::PostTask( | 169 BrowserThread::PostTask( |
| 170 BrowserThread::UI, FROM_HERE, | 170 BrowserThread::UI, FROM_HERE, |
| 171 base::Bind(&RegisterPepperFlashWithChrome, path, version)); | 171 base::Bind(&RegisterPepperFlashWithChrome, |
| 172 path.Append(chrome::kPepperFlashPluginFilename), |
| 173 version)); |
| 172 } | 174 } |
| 173 #endif // !defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD) | 175 #endif // !defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD) |
| 174 | 176 |
| 175 #if defined(GOOGLE_CHROME_BUILD) | 177 #if defined(GOOGLE_CHROME_BUILD) |
| 176 class FlashComponentInstallerTraits : public ComponentInstallerTraits { | 178 class FlashComponentInstallerTraits : public ComponentInstallerTraits { |
| 177 public: | 179 public: |
| 178 FlashComponentInstallerTraits(); | 180 FlashComponentInstallerTraits(); |
| 179 ~FlashComponentInstallerTraits() override {} | 181 ~FlashComponentInstallerTraits() override {} |
| 180 | 182 |
| 181 private: | 183 private: |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 std::unique_ptr<ComponentInstallerTraits> traits( | 280 std::unique_ptr<ComponentInstallerTraits> traits( |
| 279 new FlashComponentInstallerTraits); | 281 new FlashComponentInstallerTraits); |
| 280 // |cus| will take ownership of |installer| during installer->Register(cus). | 282 // |cus| will take ownership of |installer| during installer->Register(cus). |
| 281 DefaultComponentInstaller* installer = | 283 DefaultComponentInstaller* installer = |
| 282 new DefaultComponentInstaller(std::move(traits)); | 284 new DefaultComponentInstaller(std::move(traits)); |
| 283 installer->Register(cus, base::Closure()); | 285 installer->Register(cus, base::Closure()); |
| 284 #endif // defined(GOOGLE_CHROME_BUILD) | 286 #endif // defined(GOOGLE_CHROME_BUILD) |
| 285 } | 287 } |
| 286 | 288 |
| 287 } // namespace component_updater | 289 } // namespace component_updater |
| OLD | NEW |