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

Issue 2652893005: Create the IOSImageDataFetcher (Closed)

Created:
3 years, 11 months ago by gambard
Modified:
3 years, 10 months ago
CC:
chromium-reviews, pkl (ping after 24h if needed), droger+watchlist_chromium.org, blundell+watchlist_chromium.org, sdefresne+watchlist_chromium.org, Eugene But (OOO till 7-30), noyau+watch_chromium.org, marq+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Create the IOSImageDataFetcher Create a subclass of ImageDataFetcher for iOS. As iOS does not decode WebP, this class has a method to returns the image decoded if it is a WebP image. BUG=683918

Patch Set 1 #

Patch Set 2 : Use it in Suggestions #

Patch Set 3 : Cleanup #

Patch Set 4 : Remove virtual #

Total comments: 12

Patch Set 5 : Address comments #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -27 lines) Patch
M components/image_fetcher/image_data_fetcher.h View 1 2 3 1 chunk +2 lines, -1 line 4 comments Download
M components/image_fetcher/image_data_fetcher.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/image_fetcher/image_data_fetcher_unittest.cc View 1 2 3 4 6 chunks +14 lines, -6 lines 0 comments Download
M components/image_fetcher/image_fetcher_impl.h View 1 chunk +3 lines, -1 line 0 comments Download
M components/image_fetcher/image_fetcher_impl.cc View 1 chunk +2 lines, -1 line 0 comments Download
A components/image_fetcher/ios/BUILD.gn View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download
A components/image_fetcher/ios/DEPS View 1 chunk +4 lines, -0 lines 0 comments Download
A components/image_fetcher/ios/OWNERS View 1 chunk +1 line, -0 lines 0 comments Download
A components/image_fetcher/ios/ios_image_data_fetcher.h View 1 2 3 4 1 chunk +59 lines, -0 lines 0 comments Download
A components/image_fetcher/ios/ios_image_data_fetcher.mm View 1 2 3 4 1 chunk +133 lines, -0 lines 0 comments Download
M ios/chrome/browser/suggestions/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M ios/chrome/browser/suggestions/image_fetcher_impl.h View 1 2 chunks +2 lines, -5 lines 0 comments Download
M ios/chrome/browser/suggestions/image_fetcher_impl.mm View 1 2 3 4 5 chunks +8 lines, -10 lines 0 comments Download
M ios/web/public/image_fetcher/webp_decoder.h View 1 chunk +1 line, -1 line 0 comments Download
M ios/web/public/image_fetcher/webp_decoder.mm View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 28 (4 generated)
gambard
PTAL. +justincohen@ for owners ios/chrome/browser/suggestions +eugenebut@ for ios/web/public include in DEPS.
3 years, 11 months ago (2017-01-24 17:19:01 UTC) #3
Eugene But (OOO till 7-30)
components/image_fetcher/ios/DEPS and ios/web lgtm
3 years, 11 months ago (2017-01-24 22:34:48 UTC) #4
Marc Treib
It's great seeing components/image_fetcher getting more widespread usage, thanks for doing this! That said, I ...
3 years, 11 months ago (2017-01-25 10:37:56 UTC) #5
Marc Treib
Actually +markusheintz. Markus, please look at my comment on the IOSImageDataFetcher class - have you ...
3 years, 11 months ago (2017-01-25 10:39:21 UTC) #7
blundell
https://codereview.chromium.org/2652893005/diff/60001/components/image_fetcher/ios/ios_image_data_fetcher.h File components/image_fetcher/ios/ios_image_data_fetcher.h (right): https://codereview.chromium.org/2652893005/diff/60001/components/image_fetcher/ios/ios_image_data_fetcher.h#newcode15 components/image_fetcher/ios/ios_image_data_fetcher.h:15: class IOSImageDataFetcher : public ImageDataFetcher { On 2017/01/25 10:37:55, ...
3 years, 11 months ago (2017-01-25 10:46:46 UTC) #9
gambard
Thanks for your feedback! Only addressing the high level design comment: The WebP decoder is ...
3 years, 11 months ago (2017-01-25 11:56:57 UTC) #10
Marc Treib
On 2017/01/25 11:56:57, gambard wrote: > Thanks for your feedback! > Only addressing the high ...
3 years, 11 months ago (2017-01-25 12:01:01 UTC) #11
markusheintz_
Great that someone is picking this up. :-) I have to refresh my memory where ...
3 years, 11 months ago (2017-01-25 12:03:45 UTC) #12
gambard
https://codereview.chromium.org/2652893005/diff/60001/components/image_fetcher/image_data_fetcher.h File components/image_fetcher/image_data_fetcher.h (right): https://codereview.chromium.org/2652893005/diff/60001/components/image_fetcher/image_data_fetcher.h#newcode30 components/image_fetcher/image_data_fetcher.h:30: const net::URLFetcher* source)>; On 2017/01/25 12:03:45, markusheintz_ wrote: > ...
3 years, 11 months ago (2017-01-25 12:09:46 UTC) #13
markusheintz_
The original idea I had in mind was different. There already exists an ios_image_decoder that ...
3 years, 11 months ago (2017-01-25 13:19:50 UTC) #14
markusheintz_
On 2017/01/25 13:19:50, markusheintz_ wrote: > The original idea I had in mind was different. ...
3 years, 11 months ago (2017-01-25 13:30:57 UTC) #15
markusheintz_
On 2017/01/25 13:30:57, markusheintz_ wrote: > On 2017/01/25 13:19:50, markusheintz_ wrote: > > The original ...
3 years, 11 months ago (2017-01-25 13:35:28 UTC) #16
gambard
On 2017/01/25 13:35:28, markusheintz_ wrote: > On 2017/01/25 13:30:57, markusheintz_ wrote: > > On 2017/01/25 ...
3 years, 11 months ago (2017-01-25 13:39:12 UTC) #17
markusheintz_
On 2017/01/25 13:39:12, gambard wrote: > On 2017/01/25 13:35:28, markusheintz_ wrote: > > On 2017/01/25 ...
3 years, 11 months ago (2017-01-25 13:45:18 UTC) #18
markusheintz_
On 2017/01/25 13:45:18, markusheintz_ wrote: > On 2017/01/25 13:39:12, gambard wrote: > > On 2017/01/25 ...
3 years, 11 months ago (2017-01-25 13:48:36 UTC) #19
markusheintz_
On 2017/01/25 13:48:36, markusheintz_ wrote: > On 2017/01/25 13:45:18, markusheintz_ wrote: > > On 2017/01/25 ...
3 years, 11 months ago (2017-01-25 13:51:48 UTC) #20
gambard
On 2017/01/25 13:48:36, markusheintz_ wrote: > On 2017/01/25 13:45:18, markusheintz_ wrote: > > On 2017/01/25 ...
3 years, 11 months ago (2017-01-25 13:53:02 UTC) #21
justincohen
ios/chrome/browser/suggestions/ LGTM
3 years, 11 months ago (2017-01-25 16:47:53 UTC) #22
gambard
Thanks, PTAL. https://codereview.chromium.org/2652893005/diff/60001/components/image_fetcher/ios/BUILD.gn File components/image_fetcher/ios/BUILD.gn (right): https://codereview.chromium.org/2652893005/diff/60001/components/image_fetcher/ios/BUILD.gn#newcode1 components/image_fetcher/ios/BUILD.gn:1: # Copyright 2016 The Chromium Authors. All ...
3 years, 10 months ago (2017-01-30 13:37:53 UTC) #23
Marc Treib
Have you talked to Markus about the design? My latest understanding was that WebP transcoding ...
3 years, 10 months ago (2017-01-31 09:13:01 UTC) #24
gambard
Yes we discussed the design with Markus and this should be an acceptable solution. https://codereview.chromium.org/2652893005/diff/80001/components/image_fetcher/image_data_fetcher.h ...
3 years, 10 months ago (2017-01-31 09:24:20 UTC) #25
Marc Treib
Thanks! Comments below. Markus is looking too now; he's more familiar with the design (and ...
3 years, 10 months ago (2017-01-31 09:54:39 UTC) #26
markusheintz_
On 2017/01/31 09:24:20, gambard wrote: > Yes we discussed the design with Markus and this ...
3 years, 10 months ago (2017-01-31 10:05:00 UTC) #27
gambard
3 years, 10 months ago (2017-01-31 15:22:25 UTC) #28
On 2017/01/31 10:05:00, markusheintz_ wrote:
> On 2017/01/31 09:24:20, gambard wrote:
> > Yes we discussed the design with Markus and this should be an acceptable
> > solution.
> > 
> >
>
https://codereview.chromium.org/2652893005/diff/80001/components/image_fetche...
> > File components/image_fetcher/image_data_fetcher.h (right):
> > 
> >
>
https://codereview.chromium.org/2652893005/diff/80001/components/image_fetche...
> > components/image_fetcher/image_data_fetcher.h:30: const net::URLFetcher*
> > source)>;
> > On 2017/01/31 09:13:01, Marc Treib wrote:
> > > On 2017/01/30 13:37:53, gambard wrote:
> > > > As the URLFetcher should probably not be exposed, I can change it for:
int
> > > > response_code, std::string mime_type.
> > > > What do you think?
> > > 
> > > I still don't quite see why you need the response code?
> > > mime_type makes more sense IMO, though I'm not convinced it's necessary -
> > IIRC,
> > > you can detect WebP from a header ("magic bytes") in the data.
> > 
> > I agree that I can detect the type from the first bytes. If we want to keep
> the
> > callback as simple as possible it is probably the best way.
> > The response code is needed by the favicon driver:
> >
>
https://cs.chromium.org/chromium/src/components/favicon/core/favicon_driver_i...
> 
> Yes we discussed the topic and Gauthier created an excellent doc.
> 
> We agreed that it is best to have a dedicated class for iOS that does the
> fetching and decoding similar to the ImageFetcher.
> The ImageFetcher could be used thanks to the Delegate interface but won't be
> used for the reasons mentioned in the related design doc.
> 
> This new iOS specific class will uses the ImageDataFetcher (as it is) and the
> ImageDecoder (as it is) since they don't need to be changed. 
> 
> We also agreed that it is ok to name this new class ImageDataFetcher and
rename
> the existing ImageDataFetcher to something different to prevent confusion.
> 
> I think what we discussed it great and we should move forward with the
discussed
> solution. It also highlight that we need a solution for .ico and animated gif
> files. There even exists a bug for this that was filed by Jan.
> 
> 
> NOT LGTM

Closing this and opening https://codereview.chromium.org/2663213002.

Powered by Google App Engine
This is Rietveld 408576698