Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Side by Side Diff: components/image_fetcher/ios/ios_image_data_fetcher_wrapper.h

Issue 2669173002: Use IOSImageDataFetcherWrapper (Closed)
Patch Set: Update comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 COMPONENTS_IMAGE_FETCHER_IOS_IOS_IMAGE_DATA_FETCHER_WRAPPER_H_ 5 #ifndef COMPONENTS_IMAGE_FETCHER_IOS_IOS_IMAGE_DATA_FETCHER_WRAPPER_H_
6 #define COMPONENTS_IMAGE_FETCHER_IOS_IOS_IMAGE_DATA_FETCHER_WRAPPER_H_ 6 #define COMPONENTS_IMAGE_FETCHER_IOS_IOS_IMAGE_DATA_FETCHER_WRAPPER_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 23 matching lines...) Expand all
34 IOSImageDataFetcherWrapper( 34 IOSImageDataFetcherWrapper(
35 net::URLRequestContextGetter* url_request_context_getter, 35 net::URLRequestContextGetter* url_request_context_getter,
36 const scoped_refptr<base::TaskRunner>& task_runner); 36 const scoped_refptr<base::TaskRunner>& task_runner);
37 virtual ~IOSImageDataFetcherWrapper(); 37 virtual ~IOSImageDataFetcherWrapper();
38 38
39 // Start downloading the image at the given |image_url|. The |callback| will 39 // Start downloading the image at the given |image_url|. The |callback| will
40 // be called with the downloaded image, or nil if any error happened or the 40 // be called with the downloaded image, or nil if any error happened or the
41 // http response header is not HTTP_OK (200). If the url is a data URL, the 41 // http response header is not HTTP_OK (200). If the url is a data URL, the
42 // http response header is considered to be HTTP_OK. 42 // http response header is considered to be HTTP_OK.
43 // |callback| cannot be nil. 43 // |callback| cannot be nil.
44 void FetchImageDataWebpDecoded(const GURL& image_url, 44 virtual void FetchImageDataWebpDecoded(const GURL& image_url,
45 IOSImageDataFetcherCallback callback); 45 IOSImageDataFetcherCallback callback);
46 46
47 // Sets a service name against which to track data usage. 47 // Sets a service name against which to track data usage.
48 void SetDataUseServiceName(DataUseServiceName data_use_service_name); 48 void SetDataUseServiceName(DataUseServiceName data_use_service_name);
49 49
50 private: 50 private:
51 // The task runner used to decode images if necessary. 51 // The task runner used to decode images if necessary.
52 const scoped_refptr<base::TaskRunner> task_runner_; 52 const scoped_refptr<base::TaskRunner> task_runner_;
53 ImageDataFetcher image_data_fetcher_; 53 ImageDataFetcher image_data_fetcher_;
54 54
55 DISALLOW_COPY_AND_ASSIGN(IOSImageDataFetcherWrapper); 55 DISALLOW_COPY_AND_ASSIGN(IOSImageDataFetcherWrapper);
56 }; 56 };
57 57
58 } // namespace image_fetcher 58 } // namespace image_fetcher
59 59
60 #endif // COMPONENTS_IMAGE_FETCHER_IOS_IOS_IMAGE_DATA_FETCHER_WRAPPER_H_ 60 #endif // COMPONENTS_IMAGE_FETCHER_IOS_IOS_IMAGE_DATA_FETCHER_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698