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

Side by Side Diff: components/suggestions/image_manager.cc

Issue 2761303002: Move common ImageFetcher component files to core/ (Closed)
Patch Set: Rebased. Created 3 years, 9 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 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 "components/suggestions/image_manager.h" 5 #include "components/suggestions/image_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
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/task_runner_util.h" 12 #include "base/task_runner_util.h"
13 #include "components/image_fetcher/image_fetcher.h" 13 #include "components/image_fetcher/core/image_fetcher.h"
14 #include "components/suggestions/image_encoder.h" 14 #include "components/suggestions/image_encoder.h"
15 #include "ui/gfx/image/image.h" 15 #include "ui/gfx/image/image.h"
16 16
17 using leveldb_proto::ProtoDatabase; 17 using leveldb_proto::ProtoDatabase;
18 18
19 namespace { 19 namespace {
20 20
21 // Statistics are logged to UMA with this string as part of histogram name. They 21 // Statistics are logged to UMA with this string as part of histogram name. They
22 // can all be found under LevelDB.*.ImageManager. Changing this needs to 22 // can all be found under LevelDB.*.ImageManager. Changing this needs to
23 // synchronize with histograms.xml, AND will also become incompatible with older 23 // synchronize with histograms.xml, AND will also become incompatible with older
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 it != pending_cache_requests_.end(); ++it) { 254 it != pending_cache_requests_.end(); ++it) {
255 const ImageCacheRequest& request = it->second; 255 const ImageCacheRequest& request = it->second;
256 for (CallbackVector::const_iterator callback_it = request.callbacks.begin(); 256 for (CallbackVector::const_iterator callback_it = request.callbacks.begin();
257 callback_it != request.callbacks.end(); ++callback_it) { 257 callback_it != request.callbacks.end(); ++callback_it) {
258 ServeFromCacheOrNetwork(request.url, request.image_url, *callback_it); 258 ServeFromCacheOrNetwork(request.url, request.image_url, *callback_it);
259 } 259 }
260 } 260 }
261 } 261 }
262 262
263 } // namespace suggestions 263 } // namespace suggestions
OLDNEW
« no previous file with comments | « components/suggestions/image_manager.h ('k') | components/suggestions/image_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698