OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 2873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2884 unsigned long long requested_size, | 2884 unsigned long long requested_size, |
2885 blink::WebStorageQuotaCallbacks callbacks) { | 2885 blink::WebStorageQuotaCallbacks callbacks) { |
2886 DCHECK(!frame_ || frame_ == frame); | 2886 DCHECK(!frame_ || frame_ == frame); |
2887 WebSecurityOrigin origin = frame->document().securityOrigin(); | 2887 WebSecurityOrigin origin = frame->document().securityOrigin(); |
2888 if (origin.isUnique()) { | 2888 if (origin.isUnique()) { |
2889 // Unique origins cannot store persistent state. | 2889 // Unique origins cannot store persistent state. |
2890 callbacks.didFail(blink::WebStorageQuotaErrorAbort); | 2890 callbacks.didFail(blink::WebStorageQuotaErrorAbort); |
2891 return; | 2891 return; |
2892 } | 2892 } |
2893 ChildThread::current()->quota_dispatcher()->RequestStorageQuota( | 2893 ChildThread::current()->quota_dispatcher()->RequestStorageQuota( |
2894 render_view_->GetRoutingID(), GURL(origin.toString()), | 2894 render_view_->GetRoutingID(), |
2895 static_cast<quota::StorageType>(type), requested_size, | 2895 GURL(origin.toString()), |
| 2896 static_cast<storage::StorageType>(type), |
| 2897 requested_size, |
2896 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 2898 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
2897 } | 2899 } |
2898 | 2900 |
2899 void RenderFrameImpl::willOpenSocketStream( | 2901 void RenderFrameImpl::willOpenSocketStream( |
2900 blink::WebSocketStreamHandle* handle) { | 2902 blink::WebSocketStreamHandle* handle) { |
2901 WebSocketStreamHandleImpl* impl = | 2903 WebSocketStreamHandleImpl* impl = |
2902 static_cast<WebSocketStreamHandleImpl*>(handle); | 2904 static_cast<WebSocketStreamHandleImpl*>(handle); |
2903 impl->SetUserData(handle, new SocketStreamHandleData(routing_id_)); | 2905 impl->SetUserData(handle, new SocketStreamHandleData(routing_id_)); |
2904 } | 2906 } |
2905 | 2907 |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3748 | 3750 |
3749 #if defined(ENABLE_BROWSER_CDMS) | 3751 #if defined(ENABLE_BROWSER_CDMS) |
3750 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 3752 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
3751 if (!cdm_manager_) | 3753 if (!cdm_manager_) |
3752 cdm_manager_ = new RendererCdmManager(this); | 3754 cdm_manager_ = new RendererCdmManager(this); |
3753 return cdm_manager_; | 3755 return cdm_manager_; |
3754 } | 3756 } |
3755 #endif // defined(ENABLE_BROWSER_CDMS) | 3757 #endif // defined(ENABLE_BROWSER_CDMS) |
3756 | 3758 |
3757 } // namespace content | 3759 } // namespace content |
OLD | NEW |