| 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 #include "sky/viewer/platform/weburlloader_impl.h" | 5 #include "sky/services/platform/weburlloader_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| 11 #include "mojo/common/common_type_converters.h" | 11 #include "mojo/common/common_type_converters.h" |
| 12 #include "mojo/services/network/public/interfaces/network_service.mojom.h" | 12 #include "mojo/services/network/public/interfaces/network_service.mojom.h" |
| 13 #include "sky/engine/public/platform/WebURLError.h" | 13 #include "sky/engine/public/platform/WebURLError.h" |
| 14 #include "sky/engine/public/platform/WebURLLoadTiming.h" | 14 #include "sky/engine/public/platform/WebURLLoadTiming.h" |
| 15 #include "sky/engine/public/platform/WebURLLoaderClient.h" | 15 #include "sky/engine/public/platform/WebURLLoaderClient.h" |
| 16 #include "sky/engine/public/platform/WebURLResponse.h" | 16 #include "sky/engine/public/platform/WebURLResponse.h" |
| 17 #include "sky/viewer/converters/url_request_types.h" | 17 #include "sky/services/platform/net_constants.h" |
| 18 #include "sky/viewer/platform/net_constants.h" | 18 #include "sky/services/platform/url_request_types.h" |
| 19 | 19 |
| 20 namespace sky { | 20 namespace sky { |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 static blink::WebURLResponse::HTTPVersion StatusLineToHTTPVersion( | 23 static blink::WebURLResponse::HTTPVersion StatusLineToHTTPVersion( |
| 24 const mojo::String& status_line) { | 24 const mojo::String& status_line) { |
| 25 if (status_line.is_null()) | 25 if (status_line.is_null()) |
| 26 return blink::WebURLResponse::HTTP_0_9; | 26 return blink::WebURLResponse::HTTP_0_9; |
| 27 | 27 |
| 28 if (StartsWithASCII(status_line, "HTTP/1.0", true)) | 28 if (StartsWithASCII(status_line, "HTTP/1.0", true)) |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 MOJO_DEADLINE_INDEFINITE, | 186 MOJO_DEADLINE_INDEFINITE, |
| 187 base::Bind(&WebURLLoaderImpl::OnResponseBodyStreamReady, | 187 base::Bind(&WebURLLoaderImpl::OnResponseBodyStreamReady, |
| 188 weak_factory_.GetWeakPtr())); | 188 weak_factory_.GetWeakPtr())); |
| 189 } | 189 } |
| 190 | 190 |
| 191 void WebURLLoaderImpl::OnResponseBodyStreamReady(MojoResult result) { | 191 void WebURLLoaderImpl::OnResponseBodyStreamReady(MojoResult result) { |
| 192 ReadMore(); | 192 ReadMore(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 } // namespace sky | 195 } // namespace sky |
| OLD | NEW |