| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 258 |
| 259 // Installation is done. Now tell the rest of chrome. | 259 // Installation is done. Now tell the rest of chrome. |
| 260 // - The path service. | 260 // - The path service. |
| 261 // - Callbacks that requested an update. | 261 // - Callbacks that requested an update. |
| 262 set_current_version(version); | 262 set_current_version(version); |
| 263 CheckVersionCompatiblity(version); | 263 CheckVersionCompatiblity(version); |
| 264 OverrideDirPnaclComponent(path); | 264 OverrideDirPnaclComponent(path); |
| 265 return true; | 265 return true; |
| 266 } | 266 } |
| 267 | 267 |
| 268 base::FilePath PnaclComponentInstaller::GetBackupPath() const { |
| 269 return base::FilePath(); |
| 270 } |
| 271 |
| 272 void PnaclComponentInstaller::InstallExternally() { |
| 273 } |
| 274 |
| 268 // Given |file|, which can be a path like "_platform_specific/arm/pnacl_foo", | 275 // Given |file|, which can be a path like "_platform_specific/arm/pnacl_foo", |
| 269 // returns the assumed install path. The path separator in |file| is '/' | 276 // returns the assumed install path. The path separator in |file| is '/' |
| 270 // for all platforms. Caller is responsible for checking that the | 277 // for all platforms. Caller is responsible for checking that the |
| 271 // |installed_file| actually exists. | 278 // |installed_file| actually exists. |
| 272 bool PnaclComponentInstaller::GetInstalledFile(const std::string& file, | 279 bool PnaclComponentInstaller::GetInstalledFile(const std::string& file, |
| 273 base::FilePath* installed_file) { | 280 base::FilePath* installed_file) { |
| 274 if (current_version().Equals(Version(kNullVersion))) | 281 if (current_version().Equals(Version(kNullVersion))) |
| 275 return false; | 282 return false; |
| 276 | 283 |
| 277 *installed_file = GetPnaclBaseDirectory() | 284 *installed_file = GetPnaclBaseDirectory() |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 } // namespace component_updater | 390 } // namespace component_updater |
| 384 | 391 |
| 385 namespace pnacl { | 392 namespace pnacl { |
| 386 | 393 |
| 387 bool NeedsOnDemandUpdate() { | 394 bool NeedsOnDemandUpdate() { |
| 388 return base::subtle::NoBarrier_Load( | 395 return base::subtle::NoBarrier_Load( |
| 389 &component_updater::needs_on_demand_update) != 0; | 396 &component_updater::needs_on_demand_update) != 0; |
| 390 } | 397 } |
| 391 | 398 |
| 392 } // namespace pnacl | 399 } // namespace pnacl |
| OLD | NEW |