| Index: chrome/browser/component_updater/swiftshader_component_installer.cc
|
| diff --git a/chrome/browser/component_updater/swiftshader_component_installer.cc b/chrome/browser/component_updater/swiftshader_component_installer.cc
|
| index 411c8db491b82796258a4058a6e751c31c00690d..9ce9a750719a614124fbffc25fee4ac4b4e113a6 100644
|
| --- a/chrome/browser/component_updater/swiftshader_component_installer.cc
|
| +++ b/chrome/browser/component_updater/swiftshader_component_installer.cc
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "base/base_paths.h"
|
| #include "base/bind.h"
|
| +#include "base/bind_helpers.h"
|
| #include "base/files/file_enumerator.h"
|
| #include "base/files/file_path.h"
|
| #include "base/files/file_util.h"
|
| @@ -21,6 +22,7 @@
|
| #include "components/component_updater/component_updater_paths.h"
|
| #include "components/component_updater/component_updater_service.h"
|
| #include "components/update_client/update_client.h"
|
| +#include "components/update_client/utils.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/gpu_data_manager.h"
|
| #include "content/public/browser/gpu_data_manager_observer.h"
|
| @@ -104,8 +106,9 @@ class SwiftShaderComponentInstaller : public update_client::CrxInstaller {
|
| // ComponentInstaller implementation:
|
| void OnUpdateError(int error) override;
|
|
|
| - bool Install(const base::DictionaryValue& manifest,
|
| - const base::FilePath& unpack_path) override;
|
| + update_client::CrxInstaller::Result Install(
|
| + const base::DictionaryValue& manifest,
|
| + const base::FilePath& unpack_path) override;
|
|
|
| bool GetInstalledFile(const std::string& file,
|
| base::FilePath* installed_file) override;
|
| @@ -115,6 +118,9 @@ class SwiftShaderComponentInstaller : public update_client::CrxInstaller {
|
| private:
|
| ~SwiftShaderComponentInstaller() override {}
|
|
|
| + bool DoInstall(const base::DictionaryValue& manifest,
|
| + const base::FilePath& unpack_path);
|
| +
|
| base::Version current_version_;
|
| };
|
|
|
| @@ -128,7 +134,15 @@ void SwiftShaderComponentInstaller::OnUpdateError(int error) {
|
| NOTREACHED() << "SwiftShader update error: " << error;
|
| }
|
|
|
| -bool SwiftShaderComponentInstaller::Install(
|
| +update_client::CrxInstaller::Result SwiftShaderComponentInstaller::Install(
|
| + const base::DictionaryValue& manifest,
|
| + const base::FilePath& unpack_path) {
|
| + return update_client::InstallFunctionWrapper(base::Bind(
|
| + &SwiftShaderComponentInstaller::DoInstall, base::Unretained(this),
|
| + base::ConstRef(manifest), base::ConstRef(unpack_path)));
|
| +}
|
| +
|
| +bool SwiftShaderComponentInstaller::DoInstall(
|
| const base::DictionaryValue& manifest,
|
| const base::FilePath& unpack_path) {
|
| std::string name;
|
|
|