| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 0x73, 0x44, 0x89, 0xab, 0xa4, 0x00, 0x21, 0x32, | 59 0x73, 0x44, 0x89, 0xab, 0xa4, 0x00, 0x21, 0x32, |
| 60 0x4a, 0x06, 0x06, 0xf1, 0x51, 0x3c, 0x51, 0xba, | 60 0x4a, 0x06, 0x06, 0xf1, 0x51, 0x3c, 0x51, 0xba, |
| 61 0x31, 0x2f, 0xbc, 0xb3, 0x99, 0x07, 0xdc, 0x9c | 61 0x31, 0x2f, 0xbc, 0xb3, 0x99, 0x07, 0xdc, 0x9c |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 component->pk_hash.assign(sha256_hash, &sha256_hash[arraysize(sha256_hash)]); | 64 component->pk_hash.assign(sha256_hash, &sha256_hash[arraysize(sha256_hash)]); |
| 65 } | 65 } |
| 66 | 66 |
| 67 // If we don't have Pnacl installed, this is the version we claim. | 67 // If we don't have Pnacl installed, this is the version we claim. |
| 68 const char kNullVersion[] = "0.0.0.0"; | 68 const char kNullVersion[] = "0.0.0.0"; |
| 69 const char kMinPnaclVersion[] = "0.1.0.14173"; | 69 const char kMinPnaclVersion[] = "0.2.0.86"; |
| 70 | 70 |
| 71 // Initially say that we do not need OnDemand updates. This should be | 71 // Initially say that we do not need OnDemand updates. This should be |
| 72 // updated by CheckVersionCompatiblity(), before doing any URLRequests | 72 // updated by CheckVersionCompatiblity(), before doing any URLRequests |
| 73 // that depend on PNaCl. | 73 // that depend on PNaCl. |
| 74 volatile base::subtle::Atomic32 needs_on_demand_update = 0; | 74 volatile base::subtle::Atomic32 needs_on_demand_update = 0; |
| 75 | 75 |
| 76 void CheckVersionCompatiblity(const base::Version& current_version) { | 76 void CheckVersionCompatiblity(const base::Version& current_version) { |
| 77 // Using NoBarrier, since needs_on_demand_update is standalone and does | 77 // Using NoBarrier, since needs_on_demand_update is standalone and does |
| 78 // not have other associated data. | 78 // not have other associated data. |
| 79 base::subtle::NoBarrier_Store(&needs_on_demand_update, | 79 base::subtle::NoBarrier_Store(&needs_on_demand_update, |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 } // namespace component_updater | 373 } // namespace component_updater |
| 374 | 374 |
| 375 namespace pnacl { | 375 namespace pnacl { |
| 376 | 376 |
| 377 bool NeedsOnDemandUpdate() { | 377 bool NeedsOnDemandUpdate() { |
| 378 return base::subtle::NoBarrier_Load( | 378 return base::subtle::NoBarrier_Load( |
| 379 &component_updater::needs_on_demand_update) != 0; | 379 &component_updater::needs_on_demand_update) != 0; |
| 380 } | 380 } |
| 381 | 381 |
| 382 } // namespace pnacl | 382 } // namespace pnacl |
| OLD | NEW |