OLD | NEW |
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 "content/renderer/image_downloader/image_downloader_base.h" | 5 #include "content/renderer/image_downloader/image_downloader_base.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 if (iter != image_fetchers_.end()) { | 116 if (iter != image_fetchers_.end()) { |
117 image_fetchers_.weak_erase(iter); | 117 image_fetchers_.weak_erase(iter); |
118 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, fetcher); | 118 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, fetcher); |
119 } | 119 } |
120 | 120 |
121 // |this| may be destructed after callback is run. | 121 // |this| may be destructed after callback is run. |
122 callback.Run(http_status_code, images); | 122 callback.Run(http_status_code, images); |
123 } | 123 } |
124 | 124 |
125 void ImageDownloaderBase::OnDestruct() { | 125 void ImageDownloaderBase::OnDestruct() { |
126 for (auto fetchers : image_fetchers_) { | 126 for (auto* fetchers : image_fetchers_) { |
127 // Will run callbacks with an empty image vector. | 127 // Will run callbacks with an empty image vector. |
128 fetchers->OnRenderFrameDestruct(); | 128 fetchers->OnRenderFrameDestruct(); |
129 } | 129 } |
130 } | 130 } |
131 | 131 |
132 } // namespace content | 132 } // namespace content |
OLD | NEW |