| 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 27 matching lines...) Expand all Loading... |
| 38 #include "components/component_updater/default_component_installer.h" | 38 #include "components/component_updater/default_component_installer.h" |
| 39 #include "components/update_client/update_client.h" | 39 #include "components/update_client/update_client.h" |
| 40 #include "components/update_client/update_client_errors.h" | 40 #include "components/update_client/update_client_errors.h" |
| 41 #include "content/public/browser/browser_thread.h" | 41 #include "content/public/browser/browser_thread.h" |
| 42 #include "content/public/browser/plugin_service.h" | 42 #include "content/public/browser/plugin_service.h" |
| 43 #include "content/public/common/content_constants.h" | 43 #include "content/public/common/content_constants.h" |
| 44 #include "content/public/common/pepper_plugin_info.h" | 44 #include "content/public/common/pepper_plugin_info.h" |
| 45 #include "ppapi/shared_impl/ppapi_permissions.h" | 45 #include "ppapi/shared_impl/ppapi_permissions.h" |
| 46 | 46 |
| 47 #if defined(OS_CHROMEOS) | 47 #if defined(OS_CHROMEOS) |
| 48 #include "base/feature_list.h" | 48 #include "chrome/common/chrome_features.h" |
| 49 #include "chromeos/dbus/dbus_method_call_status.h" | 49 #include "chromeos/dbus/dbus_method_call_status.h" |
| 50 #include "chromeos/dbus/dbus_thread_manager.h" | 50 #include "chromeos/dbus/dbus_thread_manager.h" |
| 51 #include "chromeos/dbus/image_loader_client.h" | 51 #include "chromeos/dbus/image_loader_client.h" |
| 52 #include "content/public/browser/browser_thread.h" | 52 #include "content/public/browser/browser_thread.h" |
| 53 #elif defined(OS_LINUX) | 53 #elif defined(OS_LINUX) |
| 54 #include "chrome/common/component_flash_hint_file_linux.h" | 54 #include "chrome/common/component_flash_hint_file_linux.h" |
| 55 #endif // defined(OS_CHROMEOS) | 55 #endif // defined(OS_CHROMEOS) |
| 56 | 56 |
| 57 using content::BrowserThread; | 57 using content::BrowserThread; |
| 58 using content::PluginService; | 58 using content::PluginService; |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 309 |
| 310 void RegisterPepperFlashComponent(ComponentUpdateService* cus) { | 310 void RegisterPepperFlashComponent(ComponentUpdateService* cus) { |
| 311 #if defined(GOOGLE_CHROME_BUILD) | 311 #if defined(GOOGLE_CHROME_BUILD) |
| 312 // Component updated flash supersedes bundled flash therefore if that one | 312 // Component updated flash supersedes bundled flash therefore if that one |
| 313 // is disabled then this one should never install. | 313 // is disabled then this one should never install. |
| 314 base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); | 314 base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
| 315 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash)) | 315 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash)) |
| 316 return; | 316 return; |
| 317 | 317 |
| 318 #if defined(OS_CHROMEOS) | 318 #if defined(OS_CHROMEOS) |
| 319 const base::Feature kCrosCompUpdates { | 319 if (!base::FeatureList::IsEnabled(features::kCrosCompUpdates)) |
| 320 "CrosCompUpdates", base::FEATURE_DISABLED_BY_DEFAULT | |
| 321 }; | |
| 322 if (!base::FeatureList::IsEnabled(kCrosCompUpdates)) | |
| 323 return; | 320 return; |
| 324 #endif // defined(OS_CHROMEOS) | 321 #endif // defined(OS_CHROMEOS) |
| 325 | 322 |
| 326 std::unique_ptr<ComponentInstallerTraits> traits( | 323 std::unique_ptr<ComponentInstallerTraits> traits( |
| 327 new FlashComponentInstallerTraits); | 324 new FlashComponentInstallerTraits); |
| 328 // |cus| will take ownership of |installer| during installer->Register(cus). | 325 // |cus| will take ownership of |installer| during installer->Register(cus). |
| 329 DefaultComponentInstaller* installer = | 326 DefaultComponentInstaller* installer = |
| 330 new DefaultComponentInstaller(std::move(traits)); | 327 new DefaultComponentInstaller(std::move(traits)); |
| 331 installer->Register(cus, base::Closure()); | 328 installer->Register(cus, base::Closure()); |
| 332 #endif // defined(GOOGLE_CHROME_BUILD) | 329 #endif // defined(GOOGLE_CHROME_BUILD) |
| 333 } | 330 } |
| 334 | 331 |
| 335 } // namespace component_updater | 332 } // namespace component_updater |
| OLD | NEW |