| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "webkit/api/public/WebString.h" | 8 #include "webkit/api/public/WebString.h" |
| 9 #include "webkit/api/public/WebURL.h" | 9 #include "webkit/api/public/WebURL.h" |
| 10 #include "webkit/api/public/WebURLLoaderClient.h" | 10 #include "webkit/api/public/WebURLLoaderClient.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 virtual void didSendData( | 61 virtual void didSendData( |
| 62 WebURLLoader*, unsigned long long, unsigned long long) {} | 62 WebURLLoader*, unsigned long long, unsigned long long) {} |
| 63 | 63 |
| 64 virtual void didReceiveResponse(WebURLLoader* loader, | 64 virtual void didReceiveResponse(WebURLLoader* loader, |
| 65 const WebURLResponse& response) { | 65 const WebURLResponse& response) { |
| 66 ++received_response_; | 66 ++received_response_; |
| 67 response_ = response; | 67 response_ = response; |
| 68 data_.clear(); | 68 data_.clear(); |
| 69 } | 69 } |
| 70 virtual void didReceiveData(WebURLLoader* loader, | 70 virtual void didReceiveData(WebURLLoader* loader, |
| 71 const char* data, int data_length, | 71 const char* data, int data_length) { |
| 72 long long length_received) { | |
| 73 ++received_data_; | 72 ++received_data_; |
| 74 data_.append(data, data_length); | 73 data_.append(data, data_length); |
| 75 } | 74 } |
| 76 | 75 |
| 77 virtual void didFinishLoading(WebURLLoader*) {} | 76 virtual void didFinishLoading(WebURLLoader*) {} |
| 78 virtual void didFail(WebURLLoader*, const WebURLError&) {} | 77 virtual void didFail(WebURLLoader*, const WebURLError&) {} |
| 79 | 78 |
| 80 void Reset() { | 79 void Reset() { |
| 81 received_response_ = received_data_ = 0; | 80 received_response_ = received_data_ = 0; |
| 82 data_.clear(); | 81 data_.clear(); |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 content_range_upper_bound = 0; | 566 content_range_upper_bound = 0; |
| 568 | 567 |
| 569 result = MultipartResponseDelegate::ReadContentRanges( | 568 result = MultipartResponseDelegate::ReadContentRanges( |
| 570 response2, &content_range_lower_bound, | 569 response2, &content_range_lower_bound, |
| 571 &content_range_upper_bound); | 570 &content_range_upper_bound); |
| 572 | 571 |
| 573 EXPECT_EQ(result, false); | 572 EXPECT_EQ(result, false); |
| 574 } | 573 } |
| 575 | 574 |
| 576 } // namespace | 575 } // namespace |
| OLD | NEW |