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

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

Issue 10828043: Wire up the deleteFileSystem operation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 3651 matching lines...) Expand 10 before | Expand all | Expand 10 after
3662 // Unique origins cannot store persistent state. 3662 // Unique origins cannot store persistent state.
3663 callbacks->didFail(WebKit::WebFileErrorAbort); 3663 callbacks->didFail(WebKit::WebFileErrorAbort);
3664 return; 3664 return;
3665 } 3665 }
3666 3666
3667 ChildThread::current()->file_system_dispatcher()->OpenFileSystem( 3667 ChildThread::current()->file_system_dispatcher()->OpenFileSystem(
3668 GURL(origin.toString()), static_cast<fileapi::FileSystemType>(type), 3668 GURL(origin.toString()), static_cast<fileapi::FileSystemType>(type),
3669 size, create, new WebFileSystemCallbackDispatcher(callbacks)); 3669 size, create, new WebFileSystemCallbackDispatcher(callbacks));
3670 } 3670 }
3671 3671
3672 void RenderViewImpl::deleteFileSystem(
3673 WebFrame* frame,
3674 WebFileSystem::Type type ,
3675 WebFileSystemCallbacks* callbacks) {
3676 DCHECK(callbacks);
3677
3678 WebSecurityOrigin origin = frame->document().securityOrigin();
3679 if (origin.isUnique()) {
3680 // Unique origins cannot store persistent state.
3681 callbacks->didFail(WebKit::WebFileErrorAbort);
tzik 2012/07/27 17:53:47 I think we can call didSucceed here since we have
nhiroki (google) 2012/07/27 18:36:19 Done.
3682 return;
3683 }
3684
3685 ChildThread::current()->file_system_dispatcher()->DeleteFileSystem(
3686 GURL(origin.toString()),
3687 static_cast<fileapi::FileSystemType>(type),
3688 new WebFileSystemCallbackDispatcher(callbacks));
3689 }
3690
3672 void RenderViewImpl::queryStorageUsageAndQuota( 3691 void RenderViewImpl::queryStorageUsageAndQuota(
3673 WebFrame* frame, 3692 WebFrame* frame,
3674 WebStorageQuotaType type, 3693 WebStorageQuotaType type,
3675 WebStorageQuotaCallbacks* callbacks) { 3694 WebStorageQuotaCallbacks* callbacks) {
3676 DCHECK(frame); 3695 DCHECK(frame);
3677 WebSecurityOrigin origin = frame->document().securityOrigin(); 3696 WebSecurityOrigin origin = frame->document().securityOrigin();
3678 if (origin.isUnique()) { 3697 if (origin.isUnique()) {
3679 // Unique origins cannot store persistent state. 3698 // Unique origins cannot store persistent state.
3680 callbacks->didFail(WebKit::WebStorageQuotaErrorAbort); 3699 callbacks->didFail(WebKit::WebStorageQuotaErrorAbort);
3681 return; 3700 return;
(...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after
5713 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5732 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5714 return !!RenderThreadImpl::current()->compositor_thread(); 5733 return !!RenderThreadImpl::current()->compositor_thread();
5715 } 5734 }
5716 5735
5717 void RenderViewImpl::OnJavaBridgeInit() { 5736 void RenderViewImpl::OnJavaBridgeInit() {
5718 DCHECK(!java_bridge_dispatcher_); 5737 DCHECK(!java_bridge_dispatcher_);
5719 #if defined(ENABLE_JAVA_BRIDGE) 5738 #if defined(ENABLE_JAVA_BRIDGE)
5720 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5739 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5721 #endif 5740 #endif
5722 } 5741 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698