Chromium Code Reviews| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 0x73, 0x44, 0x89, 0xab, 0xa4, 0x00, 0x21, 0x32, | 58 0x73, 0x44, 0x89, 0xab, 0xa4, 0x00, 0x21, 0x32, |
| 59 0x4a, 0x06, 0x06, 0xf1, 0x51, 0x3c, 0x51, 0xba, | 59 0x4a, 0x06, 0x06, 0xf1, 0x51, 0x3c, 0x51, 0xba, |
| 60 0x31, 0x2f, 0xbc, 0xb3, 0x99, 0x07, 0xdc, 0x9c | 60 0x31, 0x2f, 0xbc, 0xb3, 0x99, 0x07, 0xdc, 0x9c |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 component->pk_hash.assign(sha256_hash, &sha256_hash[arraysize(sha256_hash)]); | 63 component->pk_hash.assign(sha256_hash, &sha256_hash[arraysize(sha256_hash)]); |
| 64 } | 64 } |
| 65 | 65 |
| 66 // If we don't have Pnacl installed, this is the version we claim. | 66 // If we don't have Pnacl installed, this is the version we claim. |
| 67 const char kNullVersion[] = "0.0.0.0"; | 67 const char kNullVersion[] = "0.0.0.0"; |
| 68 const char kMinPnaclVersion[] = "0.1.0.13367"; | 68 const char kMinPnaclVersion[] = "0.1.0.14173"; |
|
Mark Seaborn
2014/12/11 19:22:43
As an aside, what happens when we switch to using
jvoung (off chromium)
2014/12/11 19:58:39
Yes, we will need to have some monotonically incre
| |
| 69 | 69 |
| 70 // Initially say that we do not need OnDemand updates. This should be | 70 // Initially say that we do not need OnDemand updates. This should be |
| 71 // updated by CheckVersionCompatiblity(), before doing any URLRequests | 71 // updated by CheckVersionCompatiblity(), before doing any URLRequests |
| 72 // that depend on PNaCl. | 72 // that depend on PNaCl. |
| 73 volatile base::subtle::Atomic32 needs_on_demand_update = 0; | 73 volatile base::subtle::Atomic32 needs_on_demand_update = 0; |
| 74 | 74 |
| 75 void CheckVersionCompatiblity(const base::Version& current_version) { | 75 void CheckVersionCompatiblity(const base::Version& current_version) { |
| 76 // Using NoBarrier, since needs_on_demand_update is standalone and does | 76 // Using NoBarrier, since needs_on_demand_update is standalone and does |
| 77 // not have other associated data. | 77 // not have other associated data. |
| 78 base::subtle::NoBarrier_Store(&needs_on_demand_update, | 78 base::subtle::NoBarrier_Store(&needs_on_demand_update, |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 372 } // namespace component_updater | 372 } // namespace component_updater |
| 373 | 373 |
| 374 namespace pnacl { | 374 namespace pnacl { |
| 375 | 375 |
| 376 bool NeedsOnDemandUpdate() { | 376 bool NeedsOnDemandUpdate() { |
| 377 return base::subtle::NoBarrier_Load( | 377 return base::subtle::NoBarrier_Load( |
| 378 &component_updater::needs_on_demand_update) != 0; | 378 &component_updater::needs_on_demand_update) != 0; |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace pnacl | 381 } // namespace pnacl |
| OLD | NEW |