| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #import "ios/chrome/browser/net/image_fetcher.h" | 5 #import "ios/chrome/browser/net/image_fetcher.h" |
| 6 | 6 |
| 7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/mac/scoped_nsobject.h" | 12 #include "base/mac/scoped_nsobject.h" |
| 13 #include "base/task_runner.h" | 13 #include "base/task_runner.h" |
| 14 #include "ios/chrome/browser/webp_transcode/webp_decoder.h" | 14 #include "components/image_fetcher/ios/webp_decoder.h" |
| 15 #include "ios/web/public/web_thread.h" | 15 #include "ios/web/public/web_thread.h" |
| 16 #include "net/base/load_flags.h" | 16 #include "net/base/load_flags.h" |
| 17 #include "net/http/http_response_headers.h" | 17 #include "net/http/http_response_headers.h" |
| 18 #include "net/url_request/url_fetcher.h" | 18 #include "net/url_request/url_fetcher.h" |
| 19 #include "net/url_request/url_request_context_getter.h" | 19 #include "net/url_request/url_request_context_getter.h" |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 class WebpDecoderDelegate : public webp_transcode::WebpDecoder::Delegate { | 23 class WebpDecoderDelegate : public webp_transcode::WebpDecoder::Delegate { |
| 24 public: | 24 public: |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 const GURL& url, | 165 const GURL& url, |
| 166 int http_response_code, | 166 int http_response_code, |
| 167 NSData* data) { | 167 NSData* data) { |
| 168 (callback.get())(url, http_response_code, data); | 168 (callback.get())(url, http_response_code, data); |
| 169 } | 169 } |
| 170 | 170 |
| 171 void ImageFetcher::SetRequestContextGetter( | 171 void ImageFetcher::SetRequestContextGetter( |
| 172 const scoped_refptr<net::URLRequestContextGetter>& request_context_getter) { | 172 const scoped_refptr<net::URLRequestContextGetter>& request_context_getter) { |
| 173 request_context_getter_ = request_context_getter; | 173 request_context_getter_ = request_context_getter; |
| 174 } | 174 } |
| OLD | NEW |