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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/plugin.cc

Issue 8525014: Get all the resources relative to a single base. Currently the same base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifdef _MSC_VER 5 #ifdef _MSC_VER
6 // Do not warn about use of std::copy with raw pointers. 6 // Do not warn about use of std::copy with raw pointers.
7 #pragma warning(disable : 4996) 7 #pragma warning(disable : 4996)
8 #endif 8 #endif
9 9
10 #include "native_client/src/trusted/plugin/plugin.h" 10 #include "native_client/src/trusted/plugin/plugin.h"
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1600 if (!SetManifestObject(manifest_json, &error_info)) { 1600 if (!SetManifestObject(manifest_json, &error_info)) {
1601 ReportLoadError(error_info); 1601 ReportLoadError(error_info);
1602 return; 1602 return;
1603 } 1603 }
1604 1604
1605 if (SelectProgramURLFromManifest(&program_url, &error_info, &is_portable)) { 1605 if (SelectProgramURLFromManifest(&program_url, &error_info, &is_portable)) {
1606 set_nacl_ready_state(LOADING); 1606 set_nacl_ready_state(LOADING);
1607 // Inform JavaScript that we found a nexe URL to load. 1607 // Inform JavaScript that we found a nexe URL to load.
1608 EnqueueProgressEvent(kProgressEventProgress); 1608 EnqueueProgressEvent(kProgressEventProgress);
1609 if (is_portable) { 1609 if (is_portable) {
1610 // TODO(jvoung): Do we want to check an ENV var if pnacl is enabled first? 1610 pp::CompletionCallback translate_callback =
1611 nacl::string llc_url; 1611 callback_factory_.NewCallback(&Plugin::BitcodeDidTranslate);
1612 nacl::string ld_url; 1612 // Will always call the callback on success or failure.
1613 if (SelectLLCURLFromManifest(&llc_url, &error_info) && 1613 pnacl_.BitcodeToNative(program_url, translate_callback);
jvoung - send to chromium... 2011/11/11 00:40:57 Should SelectLLCURLFromManifest (and for LD) be re
sehr (please use chromium) 2011/11/11 01:01:18 Duh. Of course I should have. Done.
1614 SelectLDURLFromManifest(&ld_url, &error_info)) { 1614 return;
1615 pp::CompletionCallback translate_callback =
1616 callback_factory_.NewCallback(&Plugin::BitcodeDidTranslate);
1617 // Will always call the callback on success or failure.
1618 pnacl_.BitcodeToNative(program_url,
1619 llc_url,
1620 ld_url,
1621 translate_callback);
1622 return;
1623 }
1624 } else { 1615 } else {
1625 pp::CompletionCallback open_callback = 1616 pp::CompletionCallback open_callback =
1626 callback_factory_.NewRequiredCallback(&Plugin::NexeFileDidOpen); 1617 callback_factory_.NewRequiredCallback(&Plugin::NexeFileDidOpen);
1627 // Will always call the callback on success or failure. 1618 // Will always call the callback on success or failure.
1628 CHECK( 1619 CHECK(
1629 nexe_downloader_.Open(program_url, 1620 nexe_downloader_.Open(program_url,
1630 DOWNLOAD_TO_FILE, 1621 DOWNLOAD_TO_FILE,
1631 open_callback, 1622 open_callback,
1632 &UpdateDownloadProgress)); 1623 &UpdateDownloadProgress));
1633 return; 1624 return;
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
2041 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, 2032 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin,
2042 comps.scheme.len); 2033 comps.scheme.len);
2043 if (scheme == kChromeExtensionUriScheme) 2034 if (scheme == kChromeExtensionUriScheme)
2044 return SCHEME_CHROME_EXTENSION; 2035 return SCHEME_CHROME_EXTENSION;
2045 if (scheme == kDataUriScheme) 2036 if (scheme == kDataUriScheme)
2046 return SCHEME_DATA; 2037 return SCHEME_DATA;
2047 return SCHEME_OTHER; 2038 return SCHEME_OTHER;
2048 } 2039 }
2049 2040
2050 } // namespace plugin 2041 } // namespace plugin
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698