| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/pepper/url_request_info_util.h" | 5 #include "content/renderer/pepper/url_request_info_util.h" | 
| 6 | 6 | 
| 7 #include "base/logging.h" | 7 #include "base/logging.h" | 
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" | 
| 9 #include "content/common/fileapi/file_system_messages.h" | 9 #include "content/common/fileapi/file_system_messages.h" | 
| 10 #include "content/renderer/pepper/common.h" | 10 #include "content/renderer/pepper/common.h" | 
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 51     WebHTTPBody *http_body) { | 51     WebHTTPBody *http_body) { | 
| 52   // Get the underlying file ref impl. | 52   // Get the underlying file ref impl. | 
| 53   if (!file_ref_resource) | 53   if (!file_ref_resource) | 
| 54     return false; | 54     return false; | 
| 55   PPB_FileRef_API* file_ref_api = file_ref_resource->AsPPB_FileRef_API(); | 55   PPB_FileRef_API* file_ref_api = file_ref_resource->AsPPB_FileRef_API(); | 
| 56   if (!file_ref_api) | 56   if (!file_ref_api) | 
| 57     return false; | 57     return false; | 
| 58   const PPB_FileRef_Impl* file_ref = | 58   const PPB_FileRef_Impl* file_ref = | 
| 59       static_cast<PPB_FileRef_Impl*>(file_ref_api); | 59       static_cast<PPB_FileRef_Impl*>(file_ref_api); | 
| 60 | 60 | 
| 61   PepperPluginDelegateImpl* plugin_delegate = | 61   PepperHelperImpl* helper = ResourceHelper::GetHelper(file_ref_resource); | 
| 62       ResourceHelper::GetPluginDelegate(file_ref_resource); | 62   if (!helper) | 
| 63   if (!plugin_delegate) |  | 
| 64     return false; | 63     return false; | 
| 65 | 64 | 
| 66   base::FilePath platform_path; | 65   base::FilePath platform_path; | 
| 67   switch (file_ref->GetFileSystemType()) { | 66   switch (file_ref->GetFileSystemType()) { | 
| 68     case PP_FILESYSTEMTYPE_LOCALTEMPORARY: | 67     case PP_FILESYSTEMTYPE_LOCALTEMPORARY: | 
| 69     case PP_FILESYSTEMTYPE_LOCALPERSISTENT: | 68     case PP_FILESYSTEMTYPE_LOCALPERSISTENT: | 
| 70       // TODO(kinuko): remove this sync IPC when we fully support | 69       // TODO(kinuko): remove this sync IPC when we fully support | 
| 71       // AppendURLRange for FileSystem URL. | 70       // AppendURLRange for FileSystem URL. | 
| 72       RenderThreadImpl::current()->Send( | 71       RenderThreadImpl::current()->Send( | 
| 73           new FileSystemHostMsg_SyncGetPlatformPath( | 72           new FileSystemHostMsg_SyncGetPlatformPath( | 
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 199 bool URLRequestRequiresUniversalAccess( | 198 bool URLRequestRequiresUniversalAccess( | 
| 200     const ::ppapi::URLRequestInfoData& data) { | 199     const ::ppapi::URLRequestInfoData& data) { | 
| 201   return | 200   return | 
| 202       data.has_custom_referrer_url || | 201       data.has_custom_referrer_url || | 
| 203       data.has_custom_content_transfer_encoding || | 202       data.has_custom_content_transfer_encoding || | 
| 204       data.has_custom_user_agent || | 203       data.has_custom_user_agent || | 
| 205       url_util::FindAndCompareScheme(data.url, "javascript", NULL); | 204       url_util::FindAndCompareScheme(data.url, "javascript", NULL); | 
| 206 } | 205 } | 
| 207 | 206 | 
| 208 }  // namespace content | 207 }  // namespace content | 
| OLD | NEW | 
|---|