Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: components/nacl/renderer/json_manifest.cc

Issue 299703016: Gate disabling nacl code on proper gyp flags, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix guard on flags code Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « components/nacl/nacl_defines.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/nacl/renderer/json_manifest.h" 5 #include "components/nacl/renderer/json_manifest.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 bool JsonManifest::ResolveKey(const std::string& key, 445 bool JsonManifest::ResolveKey(const std::string& key,
446 std::string* full_url, 446 std::string* full_url,
447 PP_PNaClOptions* pnacl_options) const { 447 PP_PNaClOptions* pnacl_options) const {
448 // key must be one of kProgramKey or kFileKey '/' file-section-key 448 // key must be one of kProgramKey or kFileKey '/' file-section-key
449 if (full_url == NULL || pnacl_options == NULL) 449 if (full_url == NULL || pnacl_options == NULL)
450 return false; 450 return false;
451 451
452 if (key == kProgramKey) 452 if (key == kProgramKey)
453 return GetKeyUrl(dictionary_, key, full_url, pnacl_options); 453 return GetKeyUrl(dictionary_, key, full_url, pnacl_options);
454 454
455 std::string::const_iterator p = find(key.begin(), key.end(), '/'); 455 std::string::const_iterator p = std::find(key.begin(), key.end(), '/');
456 if (p == key.end()) { 456 if (p == key.end()) {
457 VLOG(1) << "ResolveKey failed: invalid key, no slash: " << key; 457 VLOG(1) << "ResolveKey failed: invalid key, no slash: " << key;
458 return false; 458 return false;
459 } 459 }
460 460
461 // generalize to permit other sections? 461 // generalize to permit other sections?
462 std::string prefix(key.begin(), p); 462 std::string prefix(key.begin(), p);
463 if (prefix != kFilesKey) { 463 if (prefix != kFilesKey) {
464 VLOG(1) << "ResolveKey failed: invalid key, no \"files\" prefix: " << key; 464 VLOG(1) << "ResolveKey failed: invalid key, no \"files\" prefix: " << key;
465 return false; 465 return false;
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 } else { 645 } else {
646 // NaCl 646 // NaCl
647 *url = isa_spec[kUrlKey].asString(); 647 *url = isa_spec[kUrlKey].asString();
648 pnacl_options->translate = PP_FALSE; 648 pnacl_options->translate = PP_FALSE;
649 } 649 }
650 650
651 return true; 651 return true;
652 } 652 }
653 653
654 } // namespace nacl 654 } // namespace nacl
OLDNEW
« no previous file with comments | « components/nacl/nacl_defines.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698