OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/child/web_url_loader_impl.h" | 7 #include "content/child/web_url_loader_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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 void Cancel(); | 335 void Cancel(); |
336 void SetDefersLoading(bool value); | 336 void SetDefersLoading(bool value); |
337 void DidChangePriority(WebURLRequest::Priority new_priority, | 337 void DidChangePriority(WebURLRequest::Priority new_priority, |
338 int intra_priority_value); | 338 int intra_priority_value); |
339 bool AttachThreadedDataReceiver( | 339 bool AttachThreadedDataReceiver( |
340 blink::WebThreadedDataReceiver* threaded_data_receiver); | 340 blink::WebThreadedDataReceiver* threaded_data_receiver); |
341 void Start(const WebURLRequest& request, | 341 void Start(const WebURLRequest& request, |
342 SyncLoadResponse* sync_load_response); | 342 SyncLoadResponse* sync_load_response); |
343 | 343 |
344 // RequestPeer methods: | 344 // RequestPeer methods: |
345 virtual void OnUploadProgress(uint64 position, uint64 size) OVERRIDE; | 345 virtual void OnUploadProgress(uint64 position, uint64 size) override; |
346 virtual bool OnReceivedRedirect(const net::RedirectInfo& redirect_info, | 346 virtual bool OnReceivedRedirect(const net::RedirectInfo& redirect_info, |
347 const ResourceResponseInfo& info) OVERRIDE; | 347 const ResourceResponseInfo& info) override; |
348 virtual void OnReceivedResponse(const ResourceResponseInfo& info) OVERRIDE; | 348 virtual void OnReceivedResponse(const ResourceResponseInfo& info) override; |
349 virtual void OnDownloadedData(int len, int encoded_data_length) OVERRIDE; | 349 virtual void OnDownloadedData(int len, int encoded_data_length) override; |
350 virtual void OnReceivedData(const char* data, | 350 virtual void OnReceivedData(const char* data, |
351 int data_length, | 351 int data_length, |
352 int encoded_data_length) OVERRIDE; | 352 int encoded_data_length) override; |
353 virtual void OnReceivedCachedMetadata(const char* data, int len) OVERRIDE; | 353 virtual void OnReceivedCachedMetadata(const char* data, int len) override; |
354 virtual void OnCompletedRequest( | 354 virtual void OnCompletedRequest( |
355 int error_code, | 355 int error_code, |
356 bool was_ignored_by_handler, | 356 bool was_ignored_by_handler, |
357 bool stale_copy_in_cache, | 357 bool stale_copy_in_cache, |
358 const std::string& security_info, | 358 const std::string& security_info, |
359 const base::TimeTicks& completion_time, | 359 const base::TimeTicks& completion_time, |
360 int64 total_transfer_size) OVERRIDE; | 360 int64 total_transfer_size) override; |
361 | 361 |
362 private: | 362 private: |
363 friend class base::RefCounted<Context>; | 363 friend class base::RefCounted<Context>; |
364 virtual ~Context() {} | 364 virtual ~Context() {} |
365 | 365 |
366 // We can optimize the handling of data URLs in most cases. | 366 // We can optimize the handling of data URLs in most cases. |
367 bool CanHandleDataURLRequestLocally() const; | 367 bool CanHandleDataURLRequestLocally() const; |
368 void HandleDataURL(); | 368 void HandleDataURL(); |
369 | 369 |
370 WebURLLoaderImpl* loader_; | 370 WebURLLoaderImpl* loader_; |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 int intra_priority_value) { | 1032 int intra_priority_value) { |
1033 context_->DidChangePriority(new_priority, intra_priority_value); | 1033 context_->DidChangePriority(new_priority, intra_priority_value); |
1034 } | 1034 } |
1035 | 1035 |
1036 bool WebURLLoaderImpl::attachThreadedDataReceiver( | 1036 bool WebURLLoaderImpl::attachThreadedDataReceiver( |
1037 blink::WebThreadedDataReceiver* threaded_data_receiver) { | 1037 blink::WebThreadedDataReceiver* threaded_data_receiver) { |
1038 return context_->AttachThreadedDataReceiver(threaded_data_receiver); | 1038 return context_->AttachThreadedDataReceiver(threaded_data_receiver); |
1039 } | 1039 } |
1040 | 1040 |
1041 } // namespace content | 1041 } // namespace content |
OLD | NEW |