| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/dom_ui/dom_ui_favicon_source.h" | 5 #include "chrome/browser/dom_ui/dom_ui_favicon_source.h" |
| 6 | 6 |
| 7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 8 #include "chrome/browser/profile.h" | 8 #include "chrome/browser/profile.h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 #include "grit/app_resources.h" | 10 #include "grit/app_resources.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 FaviconService* favicon_service = | 47 FaviconService* favicon_service = |
| 48 profile_->GetFaviconService(Profile::EXPLICIT_ACCESS); | 48 profile_->GetFaviconService(Profile::EXPLICIT_ACCESS); |
| 49 int request_id = cancelable_consumer_.GetClientData(favicon_service, | 49 int request_id = cancelable_consumer_.GetClientData(favicon_service, |
| 50 request_handle); | 50 request_handle); |
| 51 | 51 |
| 52 if (know_favicon && data.get() && !data->data.empty()) { | 52 if (know_favicon && data.get() && !data->data.empty()) { |
| 53 // Forward the data along to the networking system. | 53 // Forward the data along to the networking system. |
| 54 SendResponse(request_id, data); | 54 SendResponse(request_id, data); |
| 55 } else { | 55 } else { |
| 56 if (!default_favicon_.get()) { | 56 if (!default_favicon_.get()) { |
| 57 default_favicon_ = new RefCountedBytes; | 57 default_favicon_ = |
| 58 ResourceBundle::GetSharedInstance().LoadImageResourceBytes( | 58 ResourceBundle::GetSharedInstance().LoadImageResourceBytes( |
| 59 IDR_DEFAULT_FAVICON, &default_favicon_->data); | 59 IDR_DEFAULT_FAVICON); |
| 60 } | 60 } |
| 61 | 61 |
| 62 SendResponse(request_id, default_favicon_); | 62 SendResponse(request_id, default_favicon_); |
| 63 } | 63 } |
| 64 } | 64 } |
| OLD | NEW |