| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 void FinishSwiftShaderUpdateRegistration(ComponentUpdateService* cus, | 171 void FinishSwiftShaderUpdateRegistration(ComponentUpdateService* cus, |
| 172 const base::Version& version) { | 172 const base::Version& version) { |
| 173 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 173 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 174 | 174 |
| 175 update_client::CrxComponent swiftshader; | 175 update_client::CrxComponent swiftshader; |
| 176 swiftshader.name = "Swift Shader"; | 176 swiftshader.name = "Swift Shader"; |
| 177 swiftshader.installer = new SwiftShaderComponentInstaller(version); | 177 swiftshader.installer = new SwiftShaderComponentInstaller(version); |
| 178 swiftshader.version = version; | 178 swiftshader.version = version; |
| 179 swiftshader.pk_hash.assign(kSha2Hash, &kSha2Hash[sizeof(kSha2Hash)]); | 179 swiftshader.pk_hash.assign(kSha2Hash, &kSha2Hash[sizeof(kSha2Hash)]); |
| 180 swiftshader.supports_group_policy_enable_component_updates = true; | 180 swiftshader.supports_group_policy_enable_component_updates = true; |
| 181 swiftshader.requires_network_encryption = false; |
| 181 if (!cus->RegisterComponent(swiftshader)) { | 182 if (!cus->RegisterComponent(swiftshader)) { |
| 182 NOTREACHED() << "SwiftShader component registration fail"; | 183 NOTREACHED() << "SwiftShader component registration fail"; |
| 183 } | 184 } |
| 184 } | 185 } |
| 185 | 186 |
| 186 class UpdateChecker : public content::GpuDataManagerObserver { | 187 class UpdateChecker : public content::GpuDataManagerObserver { |
| 187 public: | 188 public: |
| 188 explicit UpdateChecker(ComponentUpdateService* cus); | 189 explicit UpdateChecker(ComponentUpdateService* cus); |
| 189 | 190 |
| 190 void OnGpuInfoUpdate() override; | 191 void OnGpuInfoUpdate() override; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 258 |
| 258 void RegisterSwiftShaderComponent(ComponentUpdateService* cus) { | 259 void RegisterSwiftShaderComponent(ComponentUpdateService* cus) { |
| 259 #if defined(ENABLE_SWIFTSHADER) | 260 #if defined(ENABLE_SWIFTSHADER) |
| 260 BrowserThread::PostTask(BrowserThread::FILE, | 261 BrowserThread::PostTask(BrowserThread::FILE, |
| 261 FROM_HERE, | 262 FROM_HERE, |
| 262 base::Bind(&RegisterSwiftShaderPath, cus)); | 263 base::Bind(&RegisterSwiftShaderPath, cus)); |
| 263 #endif | 264 #endif |
| 264 } | 265 } |
| 265 | 266 |
| 266 } // namespace component_updater | 267 } // namespace component_updater |
| OLD | NEW |