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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 14796018: Cleanup: Deprecate FileSystemCallbackDispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
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 "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 15 matching lines...) Expand all
26 #include "base/strings/string_split.h" 26 #include "base/strings/string_split.h"
27 #include "base/strings/sys_string_conversions.h" 27 #include "base/strings/sys_string_conversions.h"
28 #include "base/time.h" 28 #include "base/time.h"
29 #include "base/utf_string_conversions.h" 29 #include "base/utf_string_conversions.h"
30 #include "content/common/appcache/appcache_dispatcher.h" 30 #include "content/common/appcache/appcache_dispatcher.h"
31 #include "content/common/child_thread.h" 31 #include "content/common/child_thread.h"
32 #include "content/common/clipboard_messages.h" 32 #include "content/common/clipboard_messages.h"
33 #include "content/common/database_messages.h" 33 #include "content/common/database_messages.h"
34 #include "content/common/drag_messages.h" 34 #include "content/common/drag_messages.h"
35 #include "content/common/fileapi/file_system_dispatcher.h" 35 #include "content/common/fileapi/file_system_dispatcher.h"
36 #include "content/common/fileapi/webfilesystem_callback_dispatcher.h" 36 #include "content/common/fileapi/webfilesystem_callback_adapters.h"
37 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 37 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
38 #include "content/common/input_messages.h" 38 #include "content/common/input_messages.h"
39 #include "content/common/java_bridge_messages.h" 39 #include "content/common/java_bridge_messages.h"
40 #include "content/common/pepper_messages.h" 40 #include "content/common/pepper_messages.h"
41 #include "content/common/pepper_plugin_registry.h" 41 #include "content/common/pepper_plugin_registry.h"
42 #include "content/common/quota_dispatcher.h" 42 #include "content/common/quota_dispatcher.h"
43 #include "content/common/request_extra_data.h" 43 #include "content/common/request_extra_data.h"
44 #include "content/common/socket_stream_handle_data.h" 44 #include "content/common/socket_stream_handle_data.h"
45 #include "content/common/ssl_status_serialization.h" 45 #include "content/common/ssl_status_serialization.h"
46 #include "content/common/view_messages.h" 46 #include "content/common/view_messages.h"
(...skipping 4175 matching lines...) Expand 10 before | Expand all | Expand 10 after
4222 4222
4223 WebSecurityOrigin origin = frame->document().securityOrigin(); 4223 WebSecurityOrigin origin = frame->document().securityOrigin();
4224 if (origin.isUnique()) { 4224 if (origin.isUnique()) {
4225 // Unique origins cannot store persistent state. 4225 // Unique origins cannot store persistent state.
4226 callbacks->didFail(WebKit::WebFileErrorAbort); 4226 callbacks->didFail(WebKit::WebFileErrorAbort);
4227 return; 4227 return;
4228 } 4228 }
4229 4229
4230 ChildThread::current()->file_system_dispatcher()->OpenFileSystem( 4230 ChildThread::current()->file_system_dispatcher()->OpenFileSystem(
4231 GURL(origin.toString()), static_cast<fileapi::FileSystemType>(type), 4231 GURL(origin.toString()), static_cast<fileapi::FileSystemType>(type),
4232 size, create, new WebFileSystemCallbackDispatcher(callbacks)); 4232 size, create,
4233 base::Bind(&OpenFileSystemCallbackAdapter, callbacks),
4234 base::Bind(&FileStatusCallbackAdapter, callbacks));
4233 } 4235 }
4234 4236
4235 void RenderViewImpl::deleteFileSystem( 4237 void RenderViewImpl::deleteFileSystem(
4236 WebFrame* frame, 4238 WebFrame* frame,
4237 WebKit::WebFileSystemType type , 4239 WebKit::WebFileSystemType type ,
4238 WebFileSystemCallbacks* callbacks) { 4240 WebFileSystemCallbacks* callbacks) {
4239 DCHECK(callbacks); 4241 DCHECK(callbacks);
4240 4242
4241 WebSecurityOrigin origin = frame->document().securityOrigin(); 4243 WebSecurityOrigin origin = frame->document().securityOrigin();
4242 if (origin.isUnique()) { 4244 if (origin.isUnique()) {
4243 // Unique origins cannot store persistent state. 4245 // Unique origins cannot store persistent state.
4244 callbacks->didSucceed(); 4246 callbacks->didSucceed();
4245 return; 4247 return;
4246 } 4248 }
4247 4249
4248 ChildThread::current()->file_system_dispatcher()->DeleteFileSystem( 4250 ChildThread::current()->file_system_dispatcher()->DeleteFileSystem(
4249 GURL(origin.toString()), 4251 GURL(origin.toString()),
4250 static_cast<fileapi::FileSystemType>(type), 4252 static_cast<fileapi::FileSystemType>(type),
4251 new WebFileSystemCallbackDispatcher(callbacks)); 4253 base::Bind(&FileStatusCallbackAdapter, callbacks));
4252 } 4254 }
4253 4255
4254 void RenderViewImpl::queryStorageUsageAndQuota( 4256 void RenderViewImpl::queryStorageUsageAndQuota(
4255 WebFrame* frame, 4257 WebFrame* frame,
4256 WebStorageQuotaType type, 4258 WebStorageQuotaType type,
4257 WebStorageQuotaCallbacks* callbacks) { 4259 WebStorageQuotaCallbacks* callbacks) {
4258 DCHECK(frame); 4260 DCHECK(frame);
4259 WebSecurityOrigin origin = frame->document().securityOrigin(); 4261 WebSecurityOrigin origin = frame->document().securityOrigin();
4260 if (origin.isUnique()) { 4262 if (origin.isUnique()) {
4261 // Unique origins cannot store persistent state. 4263 // Unique origins cannot store persistent state.
(...skipping 2269 matching lines...) Expand 10 before | Expand all | Expand 10 after
6531 WebURL url = icon_urls[i].iconURL(); 6533 WebURL url = icon_urls[i].iconURL();
6532 if (!url.isEmpty()) 6534 if (!url.isEmpty())
6533 urls.push_back(FaviconURL(url, 6535 urls.push_back(FaviconURL(url,
6534 ToFaviconType(icon_urls[i].iconType()))); 6536 ToFaviconType(icon_urls[i].iconType())));
6535 } 6537 }
6536 SendUpdateFaviconURL(urls); 6538 SendUpdateFaviconURL(urls);
6537 } 6539 }
6538 6540
6539 6541
6540 } // namespace content 6542 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698