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

Unified Diff: content/renderer/npapi/webplugin_impl.cc

Issue 598453004: Replace some hard coded schemes with the constants in /url/url_constants.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address the comment. Created 6 years, 3 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: content/renderer/npapi/webplugin_impl.cc
diff --git a/content/renderer/npapi/webplugin_impl.cc b/content/renderer/npapi/webplugin_impl.cc
index b2ad3232bbb01e8fd90adbe952a8958c7f20f7ca..fd3eb066d12ed9dfb7870492934c8a39f7efd39e 100644
--- a/content/renderer/npapi/webplugin_impl.cc
+++ b/content/renderer/npapi/webplugin_impl.cc
@@ -1047,7 +1047,7 @@ void WebPluginImpl::didReceiveResponse(WebURLLoader* loader,
// destroy the stream and invoke the NPP_DestroyStream function on the
// plugin if the HTTP request fails.
const GURL& url = response.url();
- if (url.SchemeIs("http") || url.SchemeIs("https")) {
+ if (url.SchemeIs(url::kHttpScheme) || url.SchemeIs(url::kHttpsScheme)) {
if (response.httpStatusCode() < 100 || response.httpStatusCode() >= 400) {
// The plugin instance could be in the process of deletion here.
// Verify if the WebPluginResourceClient instance still exists before
@@ -1170,7 +1170,7 @@ void WebPluginImpl::HandleURLRequestInternal(const char* url,
// in which case we route the output to the plugin rather than routing it
// to the plugin's frame.
bool is_javascript_url =
- url::FindAndCompareScheme(url, strlen(url), "javascript", NULL);
+ url::FindAndCompareScheme(url, strlen(url), url::kJavaScriptScheme, NULL);
RoutingStatus routing_status = RouteToFrame(
url, is_javascript_url, popups_allowed, method, target, buf, len,
notify_id, referrer_flag);
« no previous file with comments | « content/renderer/media/android/media_info_loader.cc ('k') | content/renderer/pepper/pepper_plugin_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698