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

Unified Diff: ppapi/native_client/src/trusted/plugin/json_manifest.cc

Issue 231853003: Pepper: Remove Manifest::ResolveURL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nit Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/native_client/src/trusted/plugin/json_manifest.cc
diff --git a/ppapi/native_client/src/trusted/plugin/json_manifest.cc b/ppapi/native_client/src/trusted/plugin/json_manifest.cc
index 374325c5465b3e6a1b5c8ef7d9b0632bca531c62..4ab502345fe1c7971961f1d8a4649bafc6874b16 100644
--- a/ppapi/native_client/src/trusted/plugin/json_manifest.cc
+++ b/ppapi/native_client/src/trusted/plugin/json_manifest.cc
@@ -580,26 +580,6 @@ bool JsonManifest::GetKeyUrl(const Json::Value& dictionary,
return ResolveURL(relative_url, full_url, error_info);
}
-bool JsonManifest::ResolveURL(const nacl::string& relative_url,
- nacl::string* full_url,
- ErrorInfo* error_info) const {
- // The contents of the manifest are resolved relative to the manifest URL.
- CHECK(url_util_ != NULL);
- pp::Var resolved_url =
- url_util_->ResolveRelativeToURL(pp::Var(manifest_base_url_),
- relative_url);
- if (!resolved_url.is_string()) {
- error_info->SetReport(
- PP_NACL_ERROR_MANIFEST_RESOLVE_URL,
- "could not resolve url '" + relative_url +
- "' relative to manifest base url '" + manifest_base_url_.c_str() +
- "'.");
- return false;
- }
- *full_url = resolved_url.AsString();
- return true;
-}
-
bool JsonManifest::GetProgramURL(nacl::string* full_url,
PnaclOptions* pnacl_options,
bool* uses_nonsfi_mode,
@@ -686,4 +666,24 @@ bool JsonManifest::ResolveKey(const nacl::string& key,
return GetKeyUrl(files, rest, full_url, pnacl_options, error_info);
}
+bool JsonManifest::ResolveURL(const nacl::string& relative_url,
+ nacl::string* full_url,
+ ErrorInfo* error_info) const {
+ // The contents of the manifest are resolved relative to the manifest URL.
+ CHECK(url_util_ != NULL);
+ pp::Var resolved_url =
+ url_util_->ResolveRelativeToURL(pp::Var(manifest_base_url_),
+ relative_url);
+ if (!resolved_url.is_string()) {
+ error_info->SetReport(
+ PP_NACL_ERROR_MANIFEST_RESOLVE_URL,
+ "could not resolve url '" + relative_url +
+ "' relative to manifest base url '" + manifest_base_url_.c_str() +
+ "'.");
+ return false;
+ }
+ *full_url = resolved_url.AsString();
+ return true;
+}
+
} // namespace plugin
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/json_manifest.h ('k') | ppapi/native_client/src/trusted/plugin/manifest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698