| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "web/tests/sim/SimNetwork.h" | 5 #include "web/tests/sim/SimNetwork.h" |
| 6 | 6 |
| 7 #include "public/platform/Platform.h" | 7 #include "public/platform/Platform.h" |
| 8 #include "public/platform/WebURLError.h" | 8 #include "public/platform/WebURLError.h" |
| 9 #include "public/platform/WebURLLoader.h" | 9 #include "public/platform/WebURLLoader.h" |
| 10 #include "public/platform/WebURLLoaderClient.h" | 10 #include "public/platform/WebURLLoaderClient.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 int64_t totalEncodedBodyLength) { | 73 int64_t totalEncodedBodyLength) { |
| 74 if (!m_currentRequest) { | 74 if (!m_currentRequest) { |
| 75 client->didFinishLoading(finishTime, totalEncodedDataLength, | 75 client->didFinishLoading(finishTime, totalEncodedDataLength, |
| 76 totalEncodedBodyLength); | 76 totalEncodedBodyLength); |
| 77 return; | 77 return; |
| 78 } | 78 } |
| 79 m_currentRequest = nullptr; | 79 m_currentRequest = nullptr; |
| 80 } | 80 } |
| 81 | 81 |
| 82 void SimNetwork::addRequest(SimRequest& request) { | 82 void SimNetwork::addRequest(SimRequest& request) { |
| 83 m_requests.add(request.url(), &request); | 83 m_requests.insert(request.url(), &request); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void SimNetwork::removeRequest(SimRequest& request) { | 86 void SimNetwork::removeRequest(SimRequest& request) { |
| 87 m_requests.erase(request.url()); | 87 m_requests.erase(request.url()); |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace blink | 90 } // namespace blink |
| OLD | NEW |