Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2070)

Unified Diff: chrome/browser/possible_url_model.cc

Issue 6693021: fav icon -> favicon. Pass 5: fav_icon -> favicon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/possible_url_model.h ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/possible_url_model.cc
diff --git a/chrome/browser/possible_url_model.cc b/chrome/browser/possible_url_model.cc
index 73e9b46fe51b705ae7b6c1c8636404528e28c50e..d2f907ee5946d38385a9890c8bbae37adb5203cb 100644
--- a/chrome/browser/possible_url_model.cc
+++ b/chrome/browser/possible_url_model.cc
@@ -27,7 +27,7 @@ using base::TimeDelta;
namespace {
// The default favicon.
-SkBitmap* default_fav_icon = NULL;
+SkBitmap* default_favicon = NULL;
// How long we query entry points for.
const int kPossibleURLTimeScope = 30;
@@ -40,7 +40,7 @@ struct PossibleURLModel::Result {
GURL url;
// Index of this Result in results_. This is used as the key into
- // fav_icon_map_ to lookup the favicon for the url, as well as the index
+ // favicon_map_ to lookup the favicon for the url, as well as the index
// into results_ when the favicon is received.
size_t index;
ui::SortedDisplayURL display_url;
@@ -51,9 +51,9 @@ struct PossibleURLModel::Result {
PossibleURLModel::PossibleURLModel()
: profile_(NULL),
observer_(NULL) {
- if (!default_fav_icon) {
+ if (!default_favicon) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- default_fav_icon = rb.GetBitmapNamed(IDR_DEFAULT_FAVICON);
+ default_favicon = rb.GetBitmapNamed(IDR_DEFAULT_FAVICON);
}
}
@@ -99,7 +99,7 @@ void PossibleURLModel::OnHistoryQueryComplete(HistoryService::Handle h,
// service, but I think they should be implemented here because that was
// pretty specific behavior that shouldn't be generally exposed.
- fav_icon_map_.clear();
+ favicon_map_.clear();
if (observer_)
observer_->OnModelChanged();
}
@@ -148,12 +148,12 @@ string16 PossibleURLModel::GetText(int row, int col_id) {
SkBitmap PossibleURLModel::GetIcon(int row) {
if (row < 0 || row >= RowCount()) {
NOTREACHED();
- return *default_fav_icon;
+ return *default_favicon;
}
Result& result = results_[row];
- FavIconMap::iterator i = fav_icon_map_.find(result.index);
- if (i != fav_icon_map_.end()) {
+ FavIconMap::iterator i = favicon_map_.find(result.index);
+ if (i != favicon_map_.end()) {
// We already requested the favicon, return it.
if (!i->second.isNull())
return i->second;
@@ -168,10 +168,10 @@ SkBitmap PossibleURLModel::GetIcon(int row) {
consumer_.SetClientData(favicon_service, h, result.index);
// Add an entry to the map so that we don't attempt to request the
// favicon again.
- fav_icon_map_[result.index] = SkBitmap();
+ favicon_map_[result.index] = SkBitmap();
}
}
- return *default_fav_icon;
+ return *default_favicon;
}
int PossibleURLModel::CompareValues(int row1, int row2, int column_id) {
@@ -184,7 +184,7 @@ int PossibleURLModel::CompareValues(int row1, int row2, int column_id) {
void PossibleURLModel::OnFavIconAvailable(
FaviconService::Handle h,
- bool fav_icon_available,
+ bool favicon_available,
scoped_refptr<RefCountedMemory> data,
bool expired,
GURL icon_url) {
@@ -192,13 +192,13 @@ void PossibleURLModel::OnFavIconAvailable(
FaviconService* favicon_service =
profile_->GetFaviconService(Profile::EXPLICIT_ACCESS);
size_t index = consumer_.GetClientData(favicon_service, h);
- if (fav_icon_available) {
+ if (favicon_available) {
// The decoder will leave our bitmap empty on error.
gfx::PNGCodec::Decode(data->front(), data->size(),
- &(fav_icon_map_[index]));
+ &(favicon_map_[index]));
// Notify the observer.
- if (!fav_icon_map_[index].isNull() && observer_)
+ if (!favicon_map_[index].isNull() && observer_)
observer_->OnItemsChanged(static_cast<int>(index), 1);
}
}
« no previous file with comments | « chrome/browser/possible_url_model.h ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698