| 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/favicon/favicon_handler.h" |
| 6 |
| 5 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 6 #include "chrome/browser/favicon/chrome_favicon_client.h" | 8 #include "chrome/browser/favicon/chrome_favicon_client.h" |
| 7 #include "chrome/browser/favicon/chrome_favicon_client_factory.h" | 9 #include "chrome/browser/favicon/chrome_favicon_client_factory.h" |
| 8 #include "chrome/browser/favicon/favicon_handler.h" | |
| 9 #include "chrome/browser/favicon/favicon_service.h" | 10 #include "chrome/browser/favicon/favicon_service.h" |
| 10 #include "chrome/browser/favicon/favicon_service_factory.h" | 11 #include "chrome/browser/favicon/favicon_service_factory.h" |
| 12 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 11 #include "chrome/browser/history/history_service_factory.h" | 13 #include "chrome/browser/history/history_service_factory.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 15 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 14 #include "third_party/skia/include/core/SkBitmap.h" | 16 #include "third_party/skia/include/core/SkBitmap.h" |
| 15 #include "ui/gfx/codec/png_codec.h" | 17 #include "ui/gfx/codec/png_codec.h" |
| 16 #include "ui/gfx/favicon_size.h" | 18 #include "ui/gfx/favicon_size.h" |
| 17 #include "ui/gfx/image/image.h" | 19 #include "ui/gfx/image/image.h" |
| 18 | 20 |
| 19 class TestFaviconHandler; | 21 class TestFaviconHandler; |
| 20 | 22 |
| (...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1484 download_id = favicon_tab_helper->StartDownload(missing_icon_url, 0); | 1486 download_id = favicon_tab_helper->StartDownload(missing_icon_url, 0); |
| 1485 EXPECT_NE(0, download_id); | 1487 EXPECT_NE(0, download_id); |
| 1486 // Report download success with HTTP 200 status. | 1488 // Report download success with HTTP 200 status. |
| 1487 favicon_tab_helper->DidDownloadFavicon(download_id, 200, missing_icon_url, | 1489 favicon_tab_helper->DidDownloadFavicon(download_id, 200, missing_icon_url, |
| 1488 empty_icons, empty_icon_sizes); | 1490 empty_icons, empty_icon_sizes); |
| 1489 // Icon is not marked as UnableToDownload as HTTP status is not 404. | 1491 // Icon is not marked as UnableToDownload as HTTP status is not 404. |
| 1490 EXPECT_FALSE(favicon_service->WasUnableToDownloadFavicon(missing_icon_url)); | 1492 EXPECT_FALSE(favicon_service->WasUnableToDownloadFavicon(missing_icon_url)); |
| 1491 } | 1493 } |
| 1492 | 1494 |
| 1493 } // namespace. | 1495 } // namespace. |
| OLD | NEW |