OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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" | |
8 #include "base/callback.h" | 7 #include "base/callback.h" |
9 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
11 #include "grit/app_resources.h" | 10 #include "grit/app_resources.h" |
| 11 #include "ui/base/resource/resource_bundle.h" |
12 | 12 |
13 DOMUIFavIconSource::DOMUIFavIconSource(Profile* profile) | 13 DOMUIFavIconSource::DOMUIFavIconSource(Profile* profile) |
14 : DataSource(chrome::kChromeUIFavIconHost, MessageLoop::current()), | 14 : DataSource(chrome::kChromeUIFavIconHost, MessageLoop::current()), |
15 profile_(profile->GetOriginalProfile()) { | 15 profile_(profile->GetOriginalProfile()) { |
16 } | 16 } |
17 | 17 |
18 DOMUIFavIconSource::~DOMUIFavIconSource() { | 18 DOMUIFavIconSource::~DOMUIFavIconSource() { |
19 } | 19 } |
20 | 20 |
21 void DOMUIFavIconSource::StartDataRequest(const std::string& path, | 21 void DOMUIFavIconSource::StartDataRequest(const std::string& path, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 void DOMUIFavIconSource::SendDefaultResponse(int request_id) { | 76 void DOMUIFavIconSource::SendDefaultResponse(int request_id) { |
77 if (!default_favicon_.get()) { | 77 if (!default_favicon_.get()) { |
78 default_favicon_ = | 78 default_favicon_ = |
79 ResourceBundle::GetSharedInstance().LoadDataResourceBytes( | 79 ResourceBundle::GetSharedInstance().LoadDataResourceBytes( |
80 IDR_DEFAULT_FAVICON); | 80 IDR_DEFAULT_FAVICON); |
81 } | 81 } |
82 | 82 |
83 SendResponse(request_id, default_favicon_); | 83 SendResponse(request_id, default_favicon_); |
84 } | 84 } |
OLD | NEW |