| 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/ui/webui/favicon_source.h" | 5 #include "chrome/browser/ui/webui/favicon_source.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "chrome/browser/history/top_sites.h" | 9 #include "chrome/browser/history/top_sites.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/common/url_constants.h" | 11 #include "chrome/common/url_constants.h" |
| 12 #include "grit/locale_settings.h" | 12 #include "grit/locale_settings.h" |
| 13 #include "grit/ui_resources.h" | 13 #include "grit/ui_resources.h" |
| 14 #include "grit/ui_resources_standard.h" | |
| 15 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
| 16 #include "ui/base/layout.h" | 15 #include "ui/base/layout.h" |
| 17 #include "ui/base/resource/resource_bundle.h" | 16 #include "ui/base/resource/resource_bundle.h" |
| 18 | 17 |
| 19 FaviconSource::FaviconSource(Profile* profile, IconType type) | 18 FaviconSource::FaviconSource(Profile* profile, IconType type) |
| 20 : DataSource(type == FAVICON ? chrome::kChromeUIFaviconHost : | 19 : DataSource(type == FAVICON ? chrome::kChromeUIFaviconHost : |
| 21 chrome::kChromeUITouchIconHost, | 20 chrome::kChromeUITouchIconHost, |
| 22 MessageLoop::current()) { | 21 MessageLoop::current()) { |
| 23 Init(profile, type); | 22 Init(profile, type); |
| 24 } | 23 } |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 default_favicon_ = | 158 default_favicon_ = |
| 160 ResourceBundle::GetSharedInstance().LoadDataResourceBytes( | 159 ResourceBundle::GetSharedInstance().LoadDataResourceBytes( |
| 161 IDR_DEFAULT_FAVICON, ui::SCALE_FACTOR_100P); | 160 IDR_DEFAULT_FAVICON, ui::SCALE_FACTOR_100P); |
| 162 } | 161 } |
| 163 bytes = default_favicon_; | 162 bytes = default_favicon_; |
| 164 } | 163 } |
| 165 request_size_map_.erase(request_id); | 164 request_size_map_.erase(request_id); |
| 166 | 165 |
| 167 SendResponse(request_id, bytes); | 166 SendResponse(request_id, bytes); |
| 168 } | 167 } |
| OLD | NEW |