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 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. | 5 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. |
6 | 6 |
7 #include "webkit/glue/weburlloader_impl.h" | 7 #include "webkit/glue/weburlloader_impl.h" |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 OnReceivedData(data.data(), data.size(), 0); | 789 OnReceivedData(data.data(), data.size(), 0); |
790 } | 790 } |
791 | 791 |
792 OnCompletedRequest(error_code, false, info.security_info, | 792 OnCompletedRequest(error_code, false, info.security_info, |
793 base::TimeTicks::Now()); | 793 base::TimeTicks::Now()); |
794 } | 794 } |
795 | 795 |
796 // WebURLLoaderImpl ----------------------------------------------------------- | 796 // WebURLLoaderImpl ----------------------------------------------------------- |
797 | 797 |
798 WebURLLoaderImpl::WebURLLoaderImpl(WebKitPlatformSupportImpl* platform) | 798 WebURLLoaderImpl::WebURLLoaderImpl(WebKitPlatformSupportImpl* platform) |
799 : ALLOW_THIS_IN_INITIALIZER_LIST(context_(new Context(this))), | 799 : context_(new Context(this)), |
800 platform_(platform) { | 800 platform_(platform) { |
801 } | 801 } |
802 | 802 |
803 WebURLLoaderImpl::~WebURLLoaderImpl() { | 803 WebURLLoaderImpl::~WebURLLoaderImpl() { |
804 cancel(); | 804 cancel(); |
805 } | 805 } |
806 | 806 |
807 WebURLError WebURLLoaderImpl::CreateError(const WebURL& unreachable_url, | 807 WebURLError WebURLLoaderImpl::CreateError(const WebURL& unreachable_url, |
808 int reason) { | 808 int reason) { |
809 WebURLError error; | 809 WebURLError error; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 | 859 |
860 void WebURLLoaderImpl::setDefersLoading(bool value) { | 860 void WebURLLoaderImpl::setDefersLoading(bool value) { |
861 context_->SetDefersLoading(value); | 861 context_->SetDefersLoading(value); |
862 } | 862 } |
863 | 863 |
864 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority) { | 864 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority) { |
865 context_->DidChangePriority(new_priority); | 865 context_->DidChangePriority(new_priority); |
866 } | 866 } |
867 | 867 |
868 } // namespace webkit_glue | 868 } // namespace webkit_glue |
OLD | NEW |