| 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_component_installer.h" | 5 #include "chrome/browser/component_updater/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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 178     LOG(WARNING) << "'name' field in manifest is invalid (" << name | 178     LOG(WARNING) << "'name' field in manifest is invalid (" << name | 
| 179                  << ") -- missing (" << kPnaclManifestName << ")"; | 179                  << ") -- missing (" << kPnaclManifestName << ")"; | 
| 180     return false; | 180     return false; | 
| 181   } | 181   } | 
| 182 | 182 | 
| 183   std::string proposed_version; | 183   std::string proposed_version; | 
| 184   if (!manifest.GetStringASCII("version", &proposed_version)) { | 184   if (!manifest.GetStringASCII("version", &proposed_version)) { | 
| 185     LOG(WARNING) << "'version' field is missing from manifest!"; | 185     LOG(WARNING) << "'version' field is missing from manifest!"; | 
| 186     return false; | 186     return false; | 
| 187   } | 187   } | 
| 188   base::Version version(proposed_version.c_str()); | 188   base::Version version(proposed_version); | 
| 189   if (!version.IsValid()) { | 189   if (!version.IsValid()) { | 
| 190     LOG(WARNING) << "'version' field in manifest is invalid " | 190     LOG(WARNING) << "'version' field in manifest is invalid " | 
| 191                  << version.GetString(); | 191                  << version.GetString(); | 
| 192     return false; | 192     return false; | 
| 193   } | 193   } | 
| 194 | 194 | 
| 195   // Now check the |pnacl_manifest|. | 195   // Now check the |pnacl_manifest|. | 
| 196   std::string arch; | 196   std::string arch; | 
| 197   if (!pnacl_manifest.GetStringASCII("pnacl-arch", &arch)) { | 197   if (!pnacl_manifest.GetStringASCII("pnacl-arch", &arch)) { | 
| 198     LOG(WARNING) << "'pnacl-arch' field is missing from pnacl-manifest!"; | 198     LOG(WARNING) << "'pnacl-arch' field is missing from pnacl-manifest!"; | 
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 393 }  // namespace component_updater | 393 }  // namespace component_updater | 
| 394 | 394 | 
| 395 namespace pnacl { | 395 namespace pnacl { | 
| 396 | 396 | 
| 397 bool NeedsOnDemandUpdate() { | 397 bool NeedsOnDemandUpdate() { | 
| 398   return base::subtle::NoBarrier_Load( | 398   return base::subtle::NoBarrier_Load( | 
| 399              &component_updater::needs_on_demand_update) != 0; | 399              &component_updater::needs_on_demand_update) != 0; | 
| 400 } | 400 } | 
| 401 | 401 | 
| 402 }  // namespace pnacl | 402 }  // namespace pnacl | 
| OLD | NEW | 
|---|