OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/extensions/extension_web_ui.h" | 5 #include "chrome/browser/extensions/extension_web_ui.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 bitmap_result.icon_type = favicon_base::FAVICON; | 259 bitmap_result.icon_type = favicon_base::FAVICON; |
260 | 260 |
261 favicon_bitmap_results->push_back(bitmap_result); | 261 favicon_bitmap_results->push_back(bitmap_result); |
262 } else { | 262 } else { |
263 NOTREACHED() << "Could not encode extension favicon"; | 263 NOTREACHED() << "Could not encode extension favicon"; |
264 } | 264 } |
265 } | 265 } |
266 | 266 |
267 base::ThreadTaskRunnerHandle::Get()->PostTask( | 267 base::ThreadTaskRunnerHandle::Get()->PostTask( |
268 FROM_HERE, | 268 FROM_HERE, |
269 base::Bind(&favicon::FaviconService::FaviconResultsCallbackRunner, | 269 base::BindOnce(&favicon::FaviconService::FaviconResultsCallbackRunner, |
270 callback, base::Owned(favicon_bitmap_results))); | 270 callback, base::Owned(favicon_bitmap_results))); |
271 } | 271 } |
272 | 272 |
273 bool ValidateOverrideURL(const base::Value* override_url_value, | 273 bool ValidateOverrideURL(const base::Value* override_url_value, |
274 const GURL& source_url, | 274 const GURL& source_url, |
275 const extensions::ExtensionSet& extensions, | 275 const extensions::ExtensionSet& extensions, |
276 GURL* override_url, | 276 GURL* override_url, |
277 const Extension** extension) { | 277 const Extension** extension) { |
278 const base::DictionaryValue* dict = nullptr; | 278 const base::DictionaryValue* dict = nullptr; |
279 std::string override; | 279 std::string override; |
280 bool is_active = false; | 280 bool is_active = false; |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 extensions::ImageLoader::ImageRepresentation::ALWAYS_RESIZE, | 528 extensions::ImageLoader::ImageRepresentation::ALWAYS_RESIZE, |
529 gfx::Size(pixel_size, pixel_size), | 529 gfx::Size(pixel_size, pixel_size), |
530 resource_scale_factor)); | 530 resource_scale_factor)); |
531 } | 531 } |
532 | 532 |
533 // LoadImagesAsync actually can run callback synchronously. We want to force | 533 // LoadImagesAsync actually can run callback synchronously. We want to force |
534 // async. | 534 // async. |
535 extensions::ImageLoader::Get(profile)->LoadImagesAsync( | 535 extensions::ImageLoader::Get(profile)->LoadImagesAsync( |
536 extension, info_list, base::Bind(&RunFaviconCallbackAsync, callback)); | 536 extension, info_list, base::Bind(&RunFaviconCallbackAsync, callback)); |
537 } | 537 } |
OLD | NEW |