| 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 28 matching lines...) Expand all Loading... |
| 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 "chrome/browser/chromeos/settings/cros_settings.h" | 48 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 49 #include "chrome/browser/ui/ash/system_tray_client.h" | 49 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
| 50 #include "chrome/common/chrome_features.h" | 50 #include "chrome/common/chrome_features.h" |
| 51 #include "chromeos/dbus/dbus_method_call_status.h" | 51 #include "chromeos/dbus/dbus_method_call_status.h" |
| 52 #include "chromeos/dbus/dbus_thread_manager.h" | 52 #include "chromeos/dbus/dbus_thread_manager.h" |
| 53 #include "chromeos/dbus/image_loader_client.h" | 53 #include "chromeos/dbus/image_loader_client.h" |
| 54 #include "content/public/browser/browser_thread.h" | 54 #include "content/public/browser/browser_thread.h" |
| 55 #elif defined(OS_LINUX) | 55 #elif defined(OS_LINUX) |
| 56 #include "chrome/common/component_flash_hint_file_linux.h" | 56 #include "chrome/common/component_flash_hint_file_linux.h" |
| 57 #endif // defined(OS_CHROMEOS) | 57 #endif // defined(OS_CHROMEOS) |
| 58 | 58 |
| 59 using content::BrowserThread; | 59 using content::BrowserThread; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 84 bool result) { | 84 bool result) { |
| 85 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 85 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 86 if (call_status != chromeos::DBUS_METHOD_CALL_SUCCESS) { | 86 if (call_status != chromeos::DBUS_METHOD_CALL_SUCCESS) { |
| 87 LOG(ERROR) << "Call to imageloader service failed."; | 87 LOG(ERROR) << "Call to imageloader service failed."; |
| 88 return; | 88 return; |
| 89 } | 89 } |
| 90 if (!result) { | 90 if (!result) { |
| 91 LOG(ERROR) << "Component flash registration failed"; | 91 LOG(ERROR) << "Component flash registration failed"; |
| 92 return; | 92 return; |
| 93 } | 93 } |
| 94 chromeos::SystemTrayClient* tray = chromeos::SystemTrayClient::Get(); | 94 chromeos::SystemTrayDelegateChromeOS* tray = |
| 95 chromeos::SystemTrayDelegateChromeOS::instance(); |
| 95 if (tray) { | 96 if (tray) { |
| 96 tray->SetFlashUpdateAvailable(); | 97 tray->SetFlashUpdateAvailable(); |
| 97 } | 98 } |
| 98 } | 99 } |
| 99 | 100 |
| 100 void ImageLoaderRegistration(const std::string& version, | 101 void ImageLoaderRegistration(const std::string& version, |
| 101 const base::FilePath& install_dir) { | 102 const base::FilePath& install_dir) { |
| 102 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 103 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 103 chromeos::ImageLoaderClient* loader = | 104 chromeos::ImageLoaderClient* loader = |
| 104 chromeos::DBusThreadManager::Get()->GetImageLoaderClient(); | 105 chromeos::DBusThreadManager::Get()->GetImageLoaderClient(); |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 std::unique_ptr<ComponentInstallerTraits> traits( | 370 std::unique_ptr<ComponentInstallerTraits> traits( |
| 370 new FlashComponentInstallerTraits); | 371 new FlashComponentInstallerTraits); |
| 371 // |cus| will take ownership of |installer| during installer->Register(cus). | 372 // |cus| will take ownership of |installer| during installer->Register(cus). |
| 372 DefaultComponentInstaller* installer = | 373 DefaultComponentInstaller* installer = |
| 373 new DefaultComponentInstaller(std::move(traits)); | 374 new DefaultComponentInstaller(std::move(traits)); |
| 374 installer->Register(cus, base::Closure()); | 375 installer->Register(cus, base::Closure()); |
| 375 #endif // defined(GOOGLE_CHROME_BUILD) | 376 #endif // defined(GOOGLE_CHROME_BUILD) |
| 376 } | 377 } |
| 377 | 378 |
| 378 } // namespace component_updater | 379 } // namespace component_updater |
| OLD | NEW |