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 "webkit/plugins/ppapi/url_request_info_util.h" | 5 #include "webkit/plugins/ppapi/url_request_info_util.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
10 #include "googleurl/src/url_util.h" | 10 #include "googleurl/src/url_util.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 if (!file_ref_api) | 57 if (!file_ref_api) |
58 return false; | 58 return false; |
59 const PPB_FileRef_Impl* file_ref = | 59 const PPB_FileRef_Impl* file_ref = |
60 static_cast<PPB_FileRef_Impl*>(file_ref_api); | 60 static_cast<PPB_FileRef_Impl*>(file_ref_api); |
61 | 61 |
62 PluginDelegate* plugin_delegate = | 62 PluginDelegate* plugin_delegate = |
63 ResourceHelper::GetPluginDelegate(file_ref_resource); | 63 ResourceHelper::GetPluginDelegate(file_ref_resource); |
64 if (!plugin_delegate) | 64 if (!plugin_delegate) |
65 return false; | 65 return false; |
66 | 66 |
67 FilePath platform_path; | 67 base::FilePath platform_path; |
68 switch (file_ref->GetFileSystemType()) { | 68 switch (file_ref->GetFileSystemType()) { |
69 case PP_FILESYSTEMTYPE_LOCALTEMPORARY: | 69 case PP_FILESYSTEMTYPE_LOCALTEMPORARY: |
70 case PP_FILESYSTEMTYPE_LOCALPERSISTENT: | 70 case PP_FILESYSTEMTYPE_LOCALPERSISTENT: |
71 // TODO(kinuko): remove this sync IPC when we fully support | 71 // TODO(kinuko): remove this sync IPC when we fully support |
72 // AppendURLRange for FileSystem URL. | 72 // AppendURLRange for FileSystem URL. |
73 plugin_delegate->SyncGetFileSystemPlatformPath( | 73 plugin_delegate->SyncGetFileSystemPlatformPath( |
74 file_ref->GetFileSystemURL(), &platform_path); | 74 file_ref->GetFileSystemURL(), &platform_path); |
75 break; | 75 break; |
76 case PP_FILESYSTEMTYPE_EXTERNAL: | 76 case PP_FILESYSTEMTYPE_EXTERNAL: |
77 platform_path = file_ref->GetSystemPath(); | 77 platform_path = file_ref->GetSystemPath(); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 const ::ppapi::URLRequestInfoData& data) { | 198 const ::ppapi::URLRequestInfoData& data) { |
199 return | 199 return |
200 data.has_custom_referrer_url || | 200 data.has_custom_referrer_url || |
201 data.has_custom_content_transfer_encoding || | 201 data.has_custom_content_transfer_encoding || |
202 data.has_custom_user_agent || | 202 data.has_custom_user_agent || |
203 url_util::FindAndCompareScheme(data.url, "javascript", NULL); | 203 url_util::FindAndCompareScheme(data.url, "javascript", NULL); |
204 } | 204 } |
205 | 205 |
206 } // namespace ppapi | 206 } // namespace ppapi |
207 } // namespace webkit | 207 } // namespace webkit |
OLD | NEW |