| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CONTENT_RENDERER_FETCHERS_WEB_URL_LOADER_CLIENT_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_FETCHERS_WEB_URL_LOADER_CLIENT_IMPL_H_ |
| 6 #define CONTENT_RENDERER_FETCHERS_WEB_URL_LOADER_CLIENT_IMPL_H_ | 6 #define CONTENT_RENDERER_FETCHERS_WEB_URL_LOADER_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 // WebWebURLLoaderClientImpl methods: | 48 // WebWebURLLoaderClientImpl methods: |
| 49 void didReceiveResponse(blink::WebURLLoader* loader, | 49 void didReceiveResponse(blink::WebURLLoader* loader, |
| 50 const blink::WebURLResponse& response) override; | 50 const blink::WebURLResponse& response) override; |
| 51 void didReceiveCachedMetadata(blink::WebURLLoader* loader, | 51 void didReceiveCachedMetadata(blink::WebURLLoader* loader, |
| 52 const char* data, | 52 const char* data, |
| 53 int data_length) override; | 53 int data_length) override; |
| 54 void didReceiveData(blink::WebURLLoader* loader, | 54 void didReceiveData(blink::WebURLLoader* loader, |
| 55 const char* data, | 55 const char* data, |
| 56 int data_length, | 56 int data_length, |
| 57 int encoded_data_length) override; | 57 int encoded_data_length, |
| 58 int encoded_body_length) override; |
| 58 void didFinishLoading(blink::WebURLLoader* loader, | 59 void didFinishLoading(blink::WebURLLoader* loader, |
| 59 double finishTime, | 60 double finishTime, |
| 60 int64_t total_encoded_data_length) override; | 61 int64_t total_encoded_data_length) override; |
| 61 void didFail(blink::WebURLLoader* loader, | 62 void didFail(blink::WebURLLoader* loader, |
| 62 const blink::WebURLError& error) override; | 63 const blink::WebURLError& error) override; |
| 63 | 64 |
| 64 private: | 65 private: |
| 65 // Set to true once the request is complete. | 66 // Set to true once the request is complete. |
| 66 bool completed_; | 67 bool completed_; |
| 67 | 68 |
| 68 // Buffer to hold the content from the server. | 69 // Buffer to hold the content from the server. |
| 69 std::string data_; | 70 std::string data_; |
| 70 | 71 |
| 71 // A copy of the original resource response. | 72 // A copy of the original resource response. |
| 72 blink::WebURLResponse response_; | 73 blink::WebURLResponse response_; |
| 73 | 74 |
| 74 // Buffer to hold metadata from the cache. | 75 // Buffer to hold metadata from the cache. |
| 75 std::string metadata_; | 76 std::string metadata_; |
| 76 | 77 |
| 77 LoadStatus status_; | 78 LoadStatus status_; |
| 78 | 79 |
| 79 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderClientImpl); | 80 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderClientImpl); |
| 80 }; | 81 }; |
| 81 | 82 |
| 82 } // namespace content | 83 } // namespace content |
| 83 | 84 |
| 84 #endif // CONTENT_RENDERER_FETCHERS_WEB_URL_LOADER_CLIENT_IMPL_H_ | 85 #endif // CONTENT_RENDERER_FETCHERS_WEB_URL_LOADER_CLIENT_IMPL_H_ |
| OLD | NEW |