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

Side by Side Diff: chrome/browser/search/suggestions/image_decoder_impl.cc

Issue 2475543003: Introduce the image_decoder service (Closed)
Patch Set: . Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/image_decoder.cc ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <algorithm> 5 #include <algorithm>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/callback.h"
8 #include "chrome/browser/search/suggestions/image_decoder_impl.h" 9 #include "chrome/browser/search/suggestions/image_decoder_impl.h"
9 #include "ui/gfx/image/image.h" 10 #include "ui/gfx/image/image.h"
10 11
11 namespace suggestions { 12 namespace suggestions {
12 13
13 // A request for decoding an image. 14 // A request for decoding an image.
14 class ImageDecoderImpl::DecodeImageRequest 15 class ImageDecoderImpl::DecodeImageRequest
15 : public ::ImageDecoder::ImageRequest { 16 : public ::ImageDecoder::ImageRequest {
16 public: 17 public:
17 DecodeImageRequest(ImageDecoderImpl* decoder, 18 DecodeImageRequest(ImageDecoderImpl* decoder,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 std::find_if(decode_image_requests_.begin(), 80 std::find_if(decode_image_requests_.begin(),
80 decode_image_requests_.end(), 81 decode_image_requests_.end(),
81 [request](const std::unique_ptr<DecodeImageRequest>& r) { 82 [request](const std::unique_ptr<DecodeImageRequest>& r) {
82 return r.get() == request; 83 return r.get() == request;
83 }); 84 });
84 DCHECK(request_it != decode_image_requests_.end()); 85 DCHECK(request_it != decode_image_requests_.end());
85 decode_image_requests_.erase(request_it); 86 decode_image_requests_.erase(request_it);
86 } 87 }
87 88
88 } // namespace suggestions 89 } // namespace suggestions
OLDNEW
« no previous file with comments | « chrome/browser/image_decoder.cc ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698