Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / content / child / npapi / plugin_url_fetcher.cc
index d339033..42617ab 100644 (file)
@@ -16,6 +16,7 @@
 #include "content/child/request_extra_data.h"
 #include "content/child/request_info.h"
 #include "content/child/resource_dispatcher.h"
+#include "content/child/resource_loader_bridge.h"
 #include "content/child/web_url_loader_impl.h"
 #include "content/common/resource_request_body.h"
 #include "content/common/service_worker/service_worker_types.h"
@@ -26,7 +27,6 @@
 #include "net/url_request/redirect_info.h"
 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
 #include "third_party/WebKit/public/platform/WebURLResponse.h"
-#include "webkit/child/resource_loader_bridge.h"
 
 namespace content {
 namespace {
@@ -284,7 +284,7 @@ void PluginURLFetcher::OnReceivedResponse(const ResourceResponseInfo& info) {
   base::Time temp;
   uint32 last_modified = 0;
   std::string headers;
-  if (info.headers) {  // NULL for data: urls.
+  if (info.headers.get()) {  // NULL for data: urls.
     if (info.headers->GetLastModifiedValue(&temp))
       last_modified = static_cast<uint32>(temp.ToDoubleT());
 
@@ -307,7 +307,7 @@ void PluginURLFetcher::OnReceivedResponse(const ResourceResponseInfo& info) {
     // of the HTTP requests issued via NPN_GetURLNotify. Webkit and FF destroy
     // the stream and invoke the NPP_DestroyStream function on the plugin if the
     // HTTPrequest fails.
-    if ((url_.SchemeIs("http") || url_.SchemeIs("https")) &&
+    if ((url_.SchemeIs(url::kHttpScheme) || url_.SchemeIs(url::kHttpsScheme)) &&
         (response_code < 100 || response_code >= 400)) {
       pending_failure_notification_ = true;
     }