| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/swiftshader_component_installer.h" | 5 #include "chrome/browser/component_updater/swiftshader_component_installer.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 public: | 101 public: |
| 102 explicit SwiftShaderComponentInstaller(const Version& version); | 102 explicit SwiftShaderComponentInstaller(const Version& version); |
| 103 | 103 |
| 104 virtual ~SwiftShaderComponentInstaller() {} | 104 virtual ~SwiftShaderComponentInstaller() {} |
| 105 | 105 |
| 106 virtual void OnUpdateError(int error) OVERRIDE; | 106 virtual void OnUpdateError(int error) OVERRIDE; |
| 107 | 107 |
| 108 virtual bool Install(const base::DictionaryValue& manifest, | 108 virtual bool Install(const base::DictionaryValue& manifest, |
| 109 const base::FilePath& unpack_path) OVERRIDE; | 109 const base::FilePath& unpack_path) OVERRIDE; |
| 110 | 110 |
| 111 virtual void OnInstallError( |
| 112 const InstallerSourceSerializer& serializer) OVERRIDE; |
| 113 |
| 111 virtual bool GetInstalledFile(const std::string& file, | 114 virtual bool GetInstalledFile(const std::string& file, |
| 112 base::FilePath* installed_file) OVERRIDE; | 115 base::FilePath* installed_file) OVERRIDE; |
| 113 | 116 |
| 114 private: | 117 private: |
| 115 Version current_version_; | 118 Version current_version_; |
| 116 }; | 119 }; |
| 117 | 120 |
| 118 SwiftShaderComponentInstaller::SwiftShaderComponentInstaller( | 121 SwiftShaderComponentInstaller::SwiftShaderComponentInstaller( |
| 119 const Version& version) | 122 const Version& version) |
| 120 : current_version_(version) { | 123 : current_version_(version) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 150 if (!base::Move(unpack_path, path)) | 153 if (!base::Move(unpack_path, path)) |
| 151 return false; | 154 return false; |
| 152 // Installation is done. Now tell the rest of chrome. | 155 // Installation is done. Now tell the rest of chrome. |
| 153 current_version_ = version; | 156 current_version_ = version; |
| 154 BrowserThread::PostTask(BrowserThread::UI, | 157 BrowserThread::PostTask(BrowserThread::UI, |
| 155 FROM_HERE, | 158 FROM_HERE, |
| 156 base::Bind(&RegisterSwiftShaderWithChrome, path)); | 159 base::Bind(&RegisterSwiftShaderWithChrome, path)); |
| 157 return true; | 160 return true; |
| 158 } | 161 } |
| 159 | 162 |
| 163 void SwiftShaderComponentInstaller::OnInstallError( |
| 164 const InstallerSourceSerializer& serializer) { |
| 165 } |
| 166 |
| 160 bool SwiftShaderComponentInstaller::GetInstalledFile( | 167 bool SwiftShaderComponentInstaller::GetInstalledFile( |
| 161 const std::string& file, | 168 const std::string& file, |
| 162 base::FilePath* installed_file) { | 169 base::FilePath* installed_file) { |
| 163 return false; | 170 return false; |
| 164 } | 171 } |
| 165 | 172 |
| 166 void FinishSwiftShaderUpdateRegistration(ComponentUpdateService* cus, | 173 void FinishSwiftShaderUpdateRegistration(ComponentUpdateService* cus, |
| 167 const Version& version) { | 174 const Version& version) { |
| 168 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 175 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 169 | 176 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 262 |
| 256 if (!cpu.has_sse2()) | 263 if (!cpu.has_sse2()) |
| 257 return; | 264 return; |
| 258 BrowserThread::PostTask(BrowserThread::FILE, | 265 BrowserThread::PostTask(BrowserThread::FILE, |
| 259 FROM_HERE, | 266 FROM_HERE, |
| 260 base::Bind(&RegisterSwiftShaderPath, cus)); | 267 base::Bind(&RegisterSwiftShaderPath, cus)); |
| 261 #endif | 268 #endif |
| 262 } | 269 } |
| 263 | 270 |
| 264 } // namespace component_updater | 271 } // namespace component_updater |
| OLD | NEW |