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

Side by Side Diff: webkit/plugins/ppapi/ppb_url_request_info_impl.cc

Issue 10828252: Support FileSystem URL in File object (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment fix Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/weburlloader_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ppb_url_request_info_impl.h" 5 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 static_cast<PPB_FileRef_Impl*>(file_ref_api); 177 static_cast<PPB_FileRef_Impl*>(file_ref_api);
178 178
179 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); 179 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this);
180 if (!plugin_delegate) 180 if (!plugin_delegate)
181 return false; 181 return false;
182 182
183 FilePath platform_path; 183 FilePath platform_path;
184 switch (file_ref->GetFileSystemType()) { 184 switch (file_ref->GetFileSystemType()) {
185 case PP_FILESYSTEMTYPE_LOCALTEMPORARY: 185 case PP_FILESYSTEMTYPE_LOCALTEMPORARY:
186 case PP_FILESYSTEMTYPE_LOCALPERSISTENT: 186 case PP_FILESYSTEMTYPE_LOCALPERSISTENT:
187 // TODO(kinuko): remove this sync IPC when we add more generic 187 // TODO(kinuko): remove this sync IPC when we fully support
188 // AppendURLRange solution that works for both Blob/FileSystem URL. 188 // AppendURLRange for FileSystem URL.
189 plugin_delegate->SyncGetFileSystemPlatformPath( 189 plugin_delegate->SyncGetFileSystemPlatformPath(
190 file_ref->GetFileSystemURL(), &platform_path); 190 file_ref->GetFileSystemURL(), &platform_path);
191 break; 191 break;
192 case PP_FILESYSTEMTYPE_EXTERNAL: 192 case PP_FILESYSTEMTYPE_EXTERNAL:
193 platform_path = file_ref->GetSystemPath(); 193 platform_path = file_ref->GetSystemPath();
194 break; 194 break;
195 default: 195 default:
196 NOTREACHED(); 196 NOTREACHED();
197 } 197 }
198 http_body->appendFileRange( 198 http_body->appendFileRange(
199 webkit_glue::FilePathToWebString(platform_path), 199 webkit_glue::FilePathToWebString(platform_path),
200 start_offset, 200 start_offset,
201 number_of_bytes, 201 number_of_bytes,
202 expected_last_modified_time); 202 expected_last_modified_time);
203 return true; 203 return true;
204 } 204 }
205 205
206 206
207 } // namespace ppapi 207 } // namespace ppapi
208 } // namespace webkit 208 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/glue/weburlloader_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698