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/pnacl/pnacl_component_installer.h" | 5 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/atomicops.h" | 10 #include "base/atomicops.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 | 285 |
286 // Installation is done. Now tell the rest of chrome. | 286 // Installation is done. Now tell the rest of chrome. |
287 // - The path service. | 287 // - The path service. |
288 // - Callbacks that requested an update. | 288 // - Callbacks that requested an update. |
289 set_current_version(version); | 289 set_current_version(version); |
290 CheckVersionCompatiblity(version); | 290 CheckVersionCompatiblity(version); |
291 OverrideDirPnaclComponent(path); | 291 OverrideDirPnaclComponent(path); |
292 return true; | 292 return true; |
293 } | 293 } |
294 | 294 |
| 295 void PnaclComponentInstaller::OnInstallError( |
| 296 const InstallerSourceSerializer& serializer) { |
| 297 } |
| 298 |
295 // Given |file|, which can be a path like "_platform_specific/arm/pnacl_foo", | 299 // Given |file|, which can be a path like "_platform_specific/arm/pnacl_foo", |
296 // returns the assumed install path. The path separator in |file| is '/' | 300 // returns the assumed install path. The path separator in |file| is '/' |
297 // for all platforms. Caller is responsible for checking that the | 301 // for all platforms. Caller is responsible for checking that the |
298 // |installed_file| actually exists. | 302 // |installed_file| actually exists. |
299 bool PnaclComponentInstaller::GetInstalledFile(const std::string& file, | 303 bool PnaclComponentInstaller::GetInstalledFile(const std::string& file, |
300 base::FilePath* installed_file) { | 304 base::FilePath* installed_file) { |
301 if (current_version().Equals(Version(kNullVersion))) | 305 if (current_version().Equals(Version(kNullVersion))) |
302 return false; | 306 return false; |
303 | 307 |
304 *installed_file = GetPnaclBaseDirectory() | 308 *installed_file = GetPnaclBaseDirectory() |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 } // namespace component_updater | 463 } // namespace component_updater |
460 | 464 |
461 namespace pnacl { | 465 namespace pnacl { |
462 | 466 |
463 bool NeedsOnDemandUpdate() { | 467 bool NeedsOnDemandUpdate() { |
464 return base::subtle::NoBarrier_Load( | 468 return base::subtle::NoBarrier_Load( |
465 &component_updater::needs_on_demand_update) != 0; | 469 &component_updater::needs_on_demand_update) != 0; |
466 } | 470 } |
467 | 471 |
468 } // namespace pnacl | 472 } // namespace pnacl |
OLD | NEW |