diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 17:52:03 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 17:52:03 +0000 |
commit | 16be5c3ac774c21bfa88ec0582137d745f07572d (patch) | |
tree | c7ba676f4ec573b80c703fe3343b9332472f6aeb /chrome | |
parent | d2d63be523cbd238e11e160d904bcb351fdfb9e8 (diff) | |
download | chromium_src-16be5c3ac774c21bfa88ec0582137d745f07572d.zip chromium_src-16be5c3ac774c21bfa88ec0582137d745f07572d.tar.gz chromium_src-16be5c3ac774c21bfa88ec0582137d745f07572d.tar.bz2 |
fav icon -> favicon. Pass 5: fav_icon -> favicon
BUG=76073
TEST=none; no visible change
Review URL: http://codereview.chromium.org/6693021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78230 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
39 files changed, 216 insertions, 216 deletions
diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/bookmarks/bookmark_html_writer.cc index 2ed2153..7e501aa 100644 --- a/chrome/browser/bookmarks/bookmark_html_writer.cc +++ b/chrome/browser/bookmarks/bookmark_html_writer.cc @@ -439,7 +439,7 @@ bool BookmarkFaviconFetcher::FetchNextFavicon() { if (favicons_map_->end() == iter) { FaviconService* favicon_service = profile_->GetFaviconService(Profile::EXPLICIT_ACCESS); - favicon_service->GetFaviconForURL(GURL(url), &fav_icon_consumer_, + favicon_service->GetFaviconForURL(GURL(url), &favicon_consumer_, NewCallback(this, &BookmarkFaviconFetcher::OnFavIconDataAvailable)); return true; } else { diff --git a/chrome/browser/bookmarks/bookmark_html_writer.h b/chrome/browser/bookmarks/bookmark_html_writer.h index 9ae75db..fb8dca2 100644 --- a/chrome/browser/bookmarks/bookmark_html_writer.h +++ b/chrome/browser/bookmarks/bookmark_html_writer.h @@ -79,7 +79,7 @@ class BookmarkFaviconFetcher: public NotificationObserver { std::list<std::string> bookmark_urls_; // Consumer for requesting favicons. - CancelableRequestConsumer fav_icon_consumer_; + CancelableRequestConsumer favicon_consumer_; // Map that stores favicon per URL. scoped_ptr<URLFaviconMap> favicons_map_; diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc index 60edcfa..a1fb852 100644 --- a/chrome/browser/bookmarks/bookmark_model.cc +++ b/chrome/browser/bookmarks/bookmark_model.cc @@ -740,15 +740,15 @@ void BookmarkModel::OnFavIconDataAvailable( scoped_refptr<RefCountedMemory> data, bool expired, GURL icon_url) { - SkBitmap fav_icon; + SkBitmap favicon; BookmarkNode* node = load_consumer_.GetClientData( profile_->GetFaviconService(Profile::EXPLICIT_ACCESS), handle); DCHECK(node); node->set_favicon_load_handle(0); if (know_favicon && data.get() && data->size() && - gfx::PNGCodec::Decode(data->front(), data->size(), &fav_icon)) { - node->set_favicon(fav_icon); + gfx::PNGCodec::Decode(data->front(), data->size(), &favicon)) { + node->set_favicon(favicon); FavIconLoaded(node); } } diff --git a/chrome/browser/chromeos/wm_overview_controller.cc b/chrome/browser/chromeos/wm_overview_controller.cc index 656a077..68538ed 100644 --- a/chrome/browser/chromeos/wm_overview_controller.cc +++ b/chrome/browser/chromeos/wm_overview_controller.cc @@ -10,7 +10,7 @@ #include "base/linked_ptr.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/wm_ipc.h" -#include "chrome/browser/chromeos/wm_overview_fav_icon.h" +#include "chrome/browser/chromeos/wm_overview_favicon.h" #include "chrome/browser/chromeos/wm_overview_snapshot.h" #include "chrome/browser/chromeos/wm_overview_title.h" #include "chrome/browser/tab_contents/thumbnail_generator.h" @@ -165,7 +165,7 @@ class BrowserListener : public TabStripModelObserver { struct SnapshotNode { WmOverviewSnapshot* snapshot; // Not owned WmOverviewTitle* title; // Not owned - WmOverviewFavIcon* fav_icon; // Not owned + WmOverviewFavicon* favicon; // Not owned }; typedef std::vector<SnapshotNode> SnapshotVector; SnapshotVector snapshots_; @@ -238,7 +238,7 @@ void BrowserListener::TabChangedAt( if (change_type != TabStripModelObserver::LOADING_ONLY) { snapshots_[index].title->SetTitle(contents->tab_contents()->GetTitle()); snapshots_[index].title->SetUrl(contents->tab_contents()->GetURL()); - snapshots_[index].fav_icon->SetFavicon( + snapshots_[index].favicon->SetFavicon( contents->tab_contents()->GetFavicon()); if (change_type != TabStripModelObserver::TITLE_NOT_LOADING) MarkSnapshotAsDirty(index); @@ -316,8 +316,8 @@ void BrowserListener::ShowSnapshots() { node.snapshot->Show(); if (!snapshots_[i].title->IsVisible()) node.title->Show(); - if (!snapshots_[i].fav_icon->IsVisible()) - node.fav_icon->Show(); + if (!snapshots_[i].favicon->IsVisible()) + node.favicon->Show(); } } @@ -422,13 +422,13 @@ void BrowserListener::InsertSnapshot(int index) { gfx::Size cell_size = CalculateCellSize(); node.snapshot->Init(cell_size, browser_, index); - node.fav_icon = new WmOverviewFavIcon; - node.fav_icon->Init(node.snapshot); - node.fav_icon->SetFavicon(browser_->GetTabContentsAt(index)->GetFavicon()); + node.favicon = new WmOverviewFavicon; + node.favicon->Init(node.snapshot); + node.favicon->SetFavicon(browser_->GetTabContentsAt(index)->GetFavicon()); node.title = new WmOverviewTitle; node.title->Init(gfx::Size(std::max(0, cell_size.width() - - WmOverviewFavIcon::kIconSize - + WmOverviewFavicon::kIconSize - kFavIconPadding), kTitleHeight), node.snapshot); node.title->SetTitle(browser_->GetTabContentsAt(index)->GetTitle()); @@ -442,7 +442,7 @@ void BrowserListener::InsertSnapshot(int index) { void BrowserListener::ClearSnapshot(int index) { snapshots_[index].snapshot->CloseNow(); snapshots_[index].title->CloseNow(); - snapshots_[index].fav_icon->CloseNow(); + snapshots_[index].favicon->CloseNow(); snapshots_.erase(snapshots_.begin() + index); } diff --git a/chrome/browser/chromeos/wm_overview_fav_icon.cc b/chrome/browser/chromeos/wm_overview_favicon.cc index 0b98fe1..0b1cd22 100644 --- a/chrome/browser/chromeos/wm_overview_fav_icon.cc +++ b/chrome/browser/chromeos/wm_overview_favicon.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/chromeos/wm_overview_fav_icon.h" +#include "chrome/browser/chromeos/wm_overview_favicon.h" #include <vector> @@ -24,21 +24,21 @@ using std::vector; namespace chromeos { -const int WmOverviewFavIcon::kIconSize = 32; +const int WmOverviewFavicon::kIconSize = 32; -WmOverviewFavIcon::WmOverviewFavIcon() +WmOverviewFavicon::WmOverviewFavicon() : WidgetGtk(TYPE_WINDOW), - fav_icon_view_(NULL) { + favicon_view_(NULL) { } -void WmOverviewFavIcon::Init(WmOverviewSnapshot* snapshot) { +void WmOverviewFavicon::Init(WmOverviewSnapshot* snapshot) { MakeTransparent(); - fav_icon_view_ = new views::ImageView(); + favicon_view_ = new views::ImageView(); WidgetGtk::Init(NULL, gfx::Rect(0, 0, 0, 0)); - SetContentsView(fav_icon_view_); + SetContentsView(favicon_view_); // Set the window type vector<int> params; @@ -51,8 +51,8 @@ void WmOverviewFavIcon::Init(WmOverviewSnapshot* snapshot) { } -void WmOverviewFavIcon::SetFavicon(const SkBitmap& image) { - CHECK(fav_icon_view_) << "Init not called before setting favicon."; +void WmOverviewFavicon::SetFavicon(const SkBitmap& image) { + CHECK(favicon_view_) << "Init not called before setting favicon."; SkBitmap icon; if (image.width() && image.height()) { float aspect_ratio = static_cast<float>(image.width()) / image.height(); @@ -70,7 +70,7 @@ void WmOverviewFavIcon::SetFavicon(const SkBitmap& image) { } } - fav_icon_view_->SetImage(icon); + favicon_view_->SetImage(icon); // Reset the bounds to the size of the image. SetBounds(gfx::Rect(icon.width(), icon.height())); diff --git a/chrome/browser/chromeos/wm_overview_fav_icon.h b/chrome/browser/chromeos/wm_overview_favicon.h index 9edbe099..1822800 100644 --- a/chrome/browser/chromeos/wm_overview_fav_icon.h +++ b/chrome/browser/chromeos/wm_overview_favicon.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAV_ICON_H_ -#define CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAV_ICON_H_ +#ifndef CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAVICON_H_ +#define CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAVICON_H_ #pragma once #include "views/widget/widget_gtk.h" @@ -19,11 +19,11 @@ namespace chromeos { class WmOverviewSnapshot; // A single favicon displayed by WmOverviewController. -class WmOverviewFavIcon : public views::WidgetGtk { +class WmOverviewFavicon : public views::WidgetGtk { public: static const int kIconSize; - WmOverviewFavIcon(); + WmOverviewFavicon(); // Initializes the favicon to 0x0 size. void Init(WmOverviewSnapshot* snapshot); @@ -34,11 +34,11 @@ class WmOverviewFavIcon : public views::WidgetGtk { private: // This control is the contents view for this widget. - views::ImageView* fav_icon_view_; + views::ImageView* favicon_view_; - DISALLOW_COPY_AND_ASSIGN(WmOverviewFavIcon); + DISALLOW_COPY_AND_ASSIGN(WmOverviewFavicon); }; } // namespace chromeos -#endif // CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAV_ICON_H_ +#endif // CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_FAVICON_H_ diff --git a/chrome/browser/custom_home_pages_table_model.cc b/chrome/browser/custom_home_pages_table_model.cc index 9f50616..fcfdfd2 100644 --- a/chrome/browser/custom_home_pages_table_model.cc +++ b/chrome/browser/custom_home_pages_table_model.cc @@ -24,7 +24,7 @@ #include "ui/gfx/codec/png_codec.h" struct CustomHomePagesTableModel::Entry { - Entry() : title_handle(0), fav_icon_handle(0) {} + Entry() : title_handle(0), favicon_handle(0) {} // URL of the page. GURL url; @@ -39,7 +39,7 @@ struct CustomHomePagesTableModel::Entry { HistoryService::Handle title_handle; // If non-zero, indicates we're loading the favicon for the page. - FaviconService::Handle fav_icon_handle; + FaviconService::Handle favicon_handle; }; CustomHomePagesTableModel::CustomHomePagesTableModel(Profile* profile) @@ -86,11 +86,11 @@ void CustomHomePagesTableModel::Remove(int index) { if (history_service) history_service->CancelRequest(entry->title_handle); } - if (entry->fav_icon_handle) { + if (entry->favicon_handle) { FaviconService* favicon_service = profile_->GetFaviconService(Profile::EXPLICIT_ACCESS); if (favicon_service) - favicon_service->CancelRequest(entry->fav_icon_handle); + favicon_service->CancelRequest(entry->favicon_handle); } entries_.erase(entries_.begin() + static_cast<size_t>(index)); if (observer_) @@ -163,7 +163,7 @@ void CustomHomePagesTableModel::LoadTitleAndFavIcon(Entry* entry) { FaviconService* favicon_service = profile_->GetFaviconService(Profile::EXPLICIT_ACCESS); if (favicon_service) { - entry->fav_icon_handle = favicon_service->GetFaviconForURL(entry->url, + entry->favicon_handle = favicon_service->GetFaviconForURL(entry->url, &query_consumer_, NewCallback(this, &CustomHomePagesTableModel::OnGotFavIcon)); } @@ -190,19 +190,19 @@ void CustomHomePagesTableModel::OnGotTitle(HistoryService::Handle handle, void CustomHomePagesTableModel::OnGotFavIcon( FaviconService::Handle handle, - bool know_fav_icon, + bool know_favicon, scoped_refptr<RefCountedMemory> image_data, bool is_expired, GURL icon_url) { int entry_index; Entry* entry = - GetEntryByLoadHandle(&Entry::fav_icon_handle, handle, &entry_index); + GetEntryByLoadHandle(&Entry::favicon_handle, handle, &entry_index); if (!entry) { // The URLs changed before we were called back. return; } - entry->fav_icon_handle = 0; - if (know_fav_icon && image_data.get() && image_data->size()) { + entry->favicon_handle = 0; + if (know_favicon && image_data.get() && image_data->size()) { int width, height; std::vector<unsigned char> decoded_data; if (gfx::PNGCodec::Decode(image_data->front(), diff --git a/chrome/browser/custom_home_pages_table_model.h b/chrome/browser/custom_home_pages_table_model.h index b452e8d..0ef060b 100644 --- a/chrome/browser/custom_home_pages_table_model.h +++ b/chrome/browser/custom_home_pages_table_model.h @@ -69,9 +69,9 @@ class CustomHomePagesTableModel : public ui::TableModel { history::VisitVector* visits); // Callback from history service. Updates the icon of the Entry whose - // |fav_icon_handle| matches |handle| and notifies the observer of the change. + // |favicon_handle| matches |handle| and notifies the observer of the change. void OnGotFavIcon(FaviconService::Handle handle, - bool know_fav_icon, + bool know_favicon, scoped_refptr<RefCountedMemory> image_data, bool is_expired, GURL icon_url); @@ -82,7 +82,7 @@ class CustomHomePagesTableModel : public ui::TableModel { CancelableRequestProvider::Handle handle, int* entry_index); - // Returns the entry whose |fav_icon_handle| matches |handle| and sets + // Returns the entry whose |favicon_handle| matches |handle| and sets // |entry_index| to the index of the entry. Entry* GetEntryByFavIconHandle(FaviconService::Handle handle, int* entry_index); diff --git a/chrome/browser/history/expire_history_backend_unittest.cc b/chrome/browser/history/expire_history_backend_unittest.cc index f08ed8b..0bcec3b 100644 --- a/chrome/browser/history/expire_history_backend_unittest.cc +++ b/chrome/browser/history/expire_history_backend_unittest.cc @@ -201,9 +201,9 @@ void ExpireHistoryTest::AddExampleData(URLID url_ids[3], Time visit_times[4]) { // Two favicons. The first two URLs will share the same one, while the last // one will have a unique favicon. FavIconID favicon1 = thumb_db_->AddFavIcon(GURL("http://favicon/url1"), - FAV_ICON); + FAVICON); FavIconID favicon2 = thumb_db_->AddFavIcon(GURL("http://favicon/url2"), - FAV_ICON); + FAVICON); // Three URLs. URLRow url_row1(GURL("http://www.google.com/1")); @@ -413,7 +413,7 @@ void ExpireHistoryTest::EnsureURLInfoGone(const URLRow& row) { TEST_F(ExpireHistoryTest, DeleteFaviconsIfPossible) { // Add a favicon record. const GURL favicon_url("http://www.google.com/favicon.ico"); - FavIconID icon_id = thumb_db_->AddFavIcon(favicon_url, FAV_ICON); + FavIconID icon_id = thumb_db_->AddFavIcon(favicon_url, FAVICON); EXPECT_TRUE(icon_id); EXPECT_TRUE(HasFavIcon(icon_id)); @@ -460,8 +460,8 @@ TEST_F(ExpireHistoryTest, FLAKY_DeleteURLAndFavicon) { // Verify things are the way we expect with a URL row, favicon, thumbnail. URLRow last_row; ASSERT_TRUE(main_db_->GetURLRow(url_ids[2], &last_row)); - FavIconID fav_icon_id = GetFavicon(last_row.url(), FAV_ICON); - EXPECT_TRUE(HasFavIcon(fav_icon_id)); + FavIconID favicon_id = GetFavicon(last_row.url(), FAVICON); + EXPECT_TRUE(HasFavIcon(favicon_id)); // TODO(sky): fix this, see comment in HasThumbnail. // EXPECT_TRUE(HasThumbnail(url_ids[2])); @@ -510,8 +510,8 @@ TEST_F(ExpireHistoryTest, FLAKY_DeleteURLAndFavicon) { // All the normal data + the favicon should be gone. EnsureURLInfoGone(last_row); - EXPECT_FALSE(GetFavicon(last_row.url(), FAV_ICON)); - EXPECT_FALSE(HasFavIcon(fav_icon_id)); + EXPECT_FALSE(GetFavicon(last_row.url(), FAVICON)); + EXPECT_FALSE(HasFavIcon(favicon_id)); } // Deletes a URL with a favicon that other URLs reference, so that the favicon @@ -524,8 +524,8 @@ TEST_F(ExpireHistoryTest, DeleteURLWithoutFavicon) { // Verify things are the way we expect with a URL row, favicon, thumbnail. URLRow last_row; ASSERT_TRUE(main_db_->GetURLRow(url_ids[1], &last_row)); - FavIconID fav_icon_id = GetFavicon(last_row.url(), FAV_ICON); - EXPECT_TRUE(HasFavIcon(fav_icon_id)); + FavIconID favicon_id = GetFavicon(last_row.url(), FAVICON); + EXPECT_TRUE(HasFavIcon(favicon_id)); // TODO(sky): fix this, see comment in HasThumbnail. // EXPECT_TRUE(HasThumbnail(url_ids[1])); @@ -539,7 +539,7 @@ TEST_F(ExpireHistoryTest, DeleteURLWithoutFavicon) { // All the normal data + the favicon should be gone. EnsureURLInfoGone(last_row); - EXPECT_TRUE(HasFavIcon(fav_icon_id)); + EXPECT_TRUE(HasFavIcon(favicon_id)); } // DeleteURL should not delete starred urls. @@ -562,8 +562,8 @@ TEST_F(ExpireHistoryTest, DontDeleteStarredURL) { ASSERT_TRUE(main_db_->GetRowForURL(url, &url_row)); // And the favicon should exist. - FavIconID fav_icon_id = GetFavicon(url_row.url(), FAV_ICON); - EXPECT_TRUE(HasFavIcon(fav_icon_id)); + FavIconID favicon_id = GetFavicon(url_row.url(), FAVICON); + EXPECT_TRUE(HasFavIcon(favicon_id)); // But there should be no fts. ASSERT_EQ(0, CountTextMatchesForURL(url_row.url())); @@ -632,15 +632,15 @@ TEST_F(ExpireHistoryTest, FlushRecentURLsUnstarred) { EXPECT_EQ(0, temp_row.typed_count()); // Verify that the middle URL's favicon and thumbnail is still there. - FavIconID fav_icon_id = GetFavicon(url_row1.url(), FAV_ICON); - EXPECT_TRUE(HasFavIcon(fav_icon_id)); + FavIconID favicon_id = GetFavicon(url_row1.url(), FAVICON); + EXPECT_TRUE(HasFavIcon(favicon_id)); // TODO(sky): fix this, see comment in HasThumbnail. // EXPECT_TRUE(HasThumbnail(url_row1.id())); // Verify that the last URL was deleted. - FavIconID fav_icon_id2 = GetFavicon(url_row2.url(), FAV_ICON); + FavIconID favicon_id2 = GetFavicon(url_row2.url(), FAVICON); EnsureURLInfoGone(url_row2); - EXPECT_FALSE(HasFavIcon(fav_icon_id2)); + EXPECT_FALSE(HasFavIcon(favicon_id2)); } // Expires only a specific URLs more recent than a given time, with no starred @@ -691,14 +691,14 @@ TEST_F(ExpireHistoryTest, FlushRecentURLsUnstarredRestricted) { EXPECT_EQ(0, temp_row.typed_count()); // Verify that the middle URL's favicon and thumbnail is still there. - FavIconID fav_icon_id = GetFavicon(url_row1.url(), FAV_ICON); - EXPECT_TRUE(HasFavIcon(fav_icon_id)); + FavIconID favicon_id = GetFavicon(url_row1.url(), FAVICON); + EXPECT_TRUE(HasFavIcon(favicon_id)); // TODO(sky): fix this, see comment in HasThumbnail. // EXPECT_TRUE(HasThumbnail(url_row1.id())); // Verify that the last URL was not touched. EXPECT_TRUE(main_db_->GetURLRow(url_ids[2], &temp_row)); - EXPECT_TRUE(HasFavIcon(fav_icon_id)); + EXPECT_TRUE(HasFavIcon(favicon_id)); // TODO(sky): fix this, see comment in HasThumbnail. // EXPECT_TRUE(HasThumbnail(url_row2.id())); } @@ -740,12 +740,12 @@ TEST_F(ExpireHistoryTest, FlushRecentURLsStarred) { // that may have been updated since the time threshold. Since the URL still // exists in history, this should not be a privacy problem, we only update // the visit counts in this case for consistency anyway. - FavIconID fav_icon_id = GetFavicon(url_row1.url(), FAV_ICON); - EXPECT_TRUE(HasFavIcon(fav_icon_id)); + FavIconID favicon_id = GetFavicon(url_row1.url(), FAVICON); + EXPECT_TRUE(HasFavIcon(favicon_id)); // TODO(sky): fix this, see comment in HasThumbnail. // EXPECT_TRUE(HasThumbnail(new_url_row1.id())); - fav_icon_id = GetFavicon(url_row1.url(), FAV_ICON); - EXPECT_TRUE(HasFavIcon(fav_icon_id)); + favicon_id = GetFavicon(url_row1.url(), FAVICON); + EXPECT_TRUE(HasFavIcon(favicon_id)); // TODO(sky): fix this, see comment in HasThumbnail. // EXPECT_TRUE(HasThumbnail(new_url_row2.id())); } diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc index 1b3a6e0..8fe2968 100644 --- a/chrome/browser/history/history.cc +++ b/chrome/browser/history/history.cc @@ -451,7 +451,7 @@ HistoryService::Handle HistoryService::GetPageThumbnail( void HistoryService::GetFavicon(FaviconService::GetFaviconRequest* request, const GURL& icon_url) { Schedule(PRIORITY_NORMAL, &HistoryBackend::GetFavicon, NULL, request, - icon_url, history::FAV_ICON); + icon_url, history::FAVICON); } void HistoryService::UpdateFaviconMappingAndFetch( @@ -459,14 +459,14 @@ void HistoryService::UpdateFaviconMappingAndFetch( const GURL& page_url, const GURL& icon_url) { Schedule(PRIORITY_NORMAL, &HistoryBackend::UpdateFavIconMappingAndFetch, NULL, - request, page_url, icon_url, history::FAV_ICON); + request, page_url, icon_url, history::FAVICON); } void HistoryService::GetFaviconForURL( FaviconService::GetFaviconRequest* request, const GURL& page_url) { Schedule(PRIORITY_NORMAL, &HistoryBackend::GetFavIconForURL, NULL, request, - page_url, history::FAV_ICON); + page_url, history::FAVICON); } void HistoryService::SetFavicon(const GURL& page_url, @@ -478,7 +478,7 @@ void HistoryService::SetFavicon(const GURL& page_url, ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::SetFavicon, page_url, icon_url, scoped_refptr<RefCountedMemory>(new RefCountedBytes(image_data)), - history::FAV_ICON); + history::FAVICON); } void HistoryService::SetFaviconOutOfDateForPage(const GURL& page_url) { diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc index 716cb34..2d64f60 100644 --- a/chrome/browser/history/history_backend.cc +++ b/chrome/browser/history/history_backend.cc @@ -1641,11 +1641,11 @@ void HistoryBackend::SetImportedFavicons( for (size_t i = 0; i < favicon_usage.size(); i++) { FavIconID favicon_id = thumbnail_db_->GetFavIconIDForFavIconURL( - favicon_usage[i].favicon_url, history::FAV_ICON, NULL); + favicon_usage[i].favicon_url, history::FAVICON, NULL); if (!favicon_id) { // This favicon doesn't exist yet, so we create it using the given data. favicon_id = thumbnail_db_->AddFavIcon(favicon_usage[i].favicon_url, - history::FAV_ICON); + history::FAVICON); if (!favicon_id) continue; // Unable to add the favicon. thumbnail_db_->SetFavicon(favicon_id, @@ -1674,7 +1674,7 @@ void HistoryBackend::SetImportedFavicons( favicons_changed.insert(*url); } } else { - if (!thumbnail_db_->GetIconMappingForPageURL(*url, FAV_ICON, NULL)) { + if (!thumbnail_db_->GetIconMappingForPageURL(*url, FAVICON, NULL)) { // URL is present in history, update the favicon *only* if it is not // set already. thumbnail_db_->AddIconMapping(*url, favicon_id); @@ -1698,7 +1698,7 @@ void HistoryBackend::UpdateFavIconMappingAndFetchImpl( scoped_refptr<GetFavIconRequest> request, int icon_types) { // Check only a single type was given when the page_url was specified. - DCHECK(!page_url || (page_url && (icon_types == FAV_ICON || + DCHECK(!page_url || (page_url && (icon_types == FAVICON || icon_types == TOUCH_ICON || icon_types == TOUCH_PRECOMPOSED_ICON))); if (request->canceled()) diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc index ad1c869..a1f423c 100644 --- a/chrome/browser/history/history_backend_unittest.cc +++ b/chrome/browser/history/history_backend_unittest.cc @@ -217,9 +217,9 @@ TEST_F(HistoryBackendTest, DeleteAll) { GURL favicon_url1("http://www.google.com/favicon.ico"); GURL favicon_url2("http://news.google.com/favicon.ico"); FavIconID favicon2 = backend_->thumbnail_db_->AddFavIcon(favicon_url2, - FAV_ICON); + FAVICON); FavIconID favicon1 = backend_->thumbnail_db_->AddFavIcon(favicon_url1, - FAV_ICON); + FAVICON); std::vector<unsigned char> data; data.push_back('1'); @@ -323,15 +323,15 @@ TEST_F(HistoryBackendTest, DeleteAll) { // We should have a favicon for the first URL only. We look them up by favicon // URL since the IDs may hav changed. FavIconID out_favicon1 = backend_->thumbnail_db_-> - GetFavIconIDForFavIconURL(favicon_url1, FAV_ICON, NULL); + GetFavIconIDForFavIconURL(favicon_url1, FAVICON, NULL); EXPECT_TRUE(out_favicon1); FavIconID out_favicon2 = backend_->thumbnail_db_-> - GetFavIconIDForFavIconURL(favicon_url2, FAV_ICON, NULL); + GetFavIconIDForFavIconURL(favicon_url2, FAVICON, NULL); EXPECT_FALSE(out_favicon2) << "Favicon not deleted"; // The remaining URL should still reference the same favicon, even if its // ID has changed. - EXPECT_EQ(out_favicon1, GetFavicon(outrow1.url(), FAV_ICON)); + EXPECT_EQ(out_favicon1, GetFavicon(outrow1.url(), FAVICON)); // The first URL should still be bookmarked. EXPECT_TRUE(bookmark_model_.IsBookmarked(row1.url())); @@ -350,9 +350,9 @@ TEST_F(HistoryBackendTest, URLsNoLongerBookmarked) { GURL favicon_url1("http://www.google.com/favicon.ico"); GURL favicon_url2("http://news.google.com/favicon.ico"); FavIconID favicon2 = backend_->thumbnail_db_->AddFavIcon(favicon_url2, - FAV_ICON); + FAVICON); FavIconID favicon1 = backend_->thumbnail_db_->AddFavIcon(favicon_url1, - FAV_ICON); + FAVICON); std::vector<unsigned char> data; data.push_back('1'); @@ -400,7 +400,7 @@ TEST_F(HistoryBackendTest, URLsNoLongerBookmarked) { // The favicon should still be valid. EXPECT_EQ(favicon2, backend_->thumbnail_db_->GetFavIconIDForFavIconURL(favicon_url2, - FAV_ICON, + FAVICON, NULL)); // Unstar row2. @@ -416,7 +416,7 @@ TEST_F(HistoryBackendTest, URLsNoLongerBookmarked) { // And the favicon should be deleted. EXPECT_EQ(0, backend_->thumbnail_db_->GetFavIconIDForFavIconURL(favicon_url2, - FAV_ICON, + FAVICON, NULL)); // Unstar row 1. @@ -438,7 +438,7 @@ TEST_F(HistoryBackendTest, URLsNoLongerBookmarked) { // The favicon should still be valid. EXPECT_EQ(favicon1, backend_->thumbnail_db_->GetFavIconIDForFavIconURL(favicon_url1, - FAV_ICON, + FAVICON, NULL)); } @@ -523,7 +523,7 @@ TEST_F(HistoryBackendTest, ImportedFaviconsTest) { // one without. GURL favicon_url1("http://www.google.com/favicon.ico"); FavIconID favicon1 = backend_->thumbnail_db_->AddFavIcon(favicon_url1, - FAV_ICON); + FAVICON); std::vector<unsigned char> data; data.push_back('1'); EXPECT_TRUE(backend_->thumbnail_db_->SetFavicon(favicon1, @@ -543,8 +543,8 @@ TEST_F(HistoryBackendTest, ImportedFaviconsTest) { URLRow url_row1, url_row2; EXPECT_FALSE(backend_->db_->GetRowForURL(row1.url(), &url_row1) == 0); EXPECT_FALSE(backend_->db_->GetRowForURL(row2.url(), &url_row2) == 0); - EXPECT_FALSE(GetFavicon(row1.url(), FAV_ICON) == 0); - EXPECT_TRUE(GetFavicon(row2.url(), FAV_ICON) == 0); + EXPECT_FALSE(GetFavicon(row1.url(), FAVICON) == 0); + EXPECT_TRUE(GetFavicon(row2.url(), FAVICON) == 0); // Now provide one imported favicon for both URLs already in the registry. // The new favicon should only be used with the URL that doesn't already have @@ -559,10 +559,10 @@ TEST_F(HistoryBackendTest, ImportedFaviconsTest) { backend_->SetImportedFavicons(favicons); EXPECT_FALSE(backend_->db_->GetRowForURL(row1.url(), &url_row1) == 0); EXPECT_FALSE(backend_->db_->GetRowForURL(row2.url(), &url_row2) == 0); - EXPECT_FALSE(GetFavicon(row1.url(), FAV_ICON) == 0); - EXPECT_FALSE(GetFavicon(row2.url(), FAV_ICON) == 0); - EXPECT_FALSE(GetFavicon(row1.url(), FAV_ICON) == - GetFavicon(row2.url(), FAV_ICON)); + EXPECT_FALSE(GetFavicon(row1.url(), FAVICON) == 0); + EXPECT_FALSE(GetFavicon(row2.url(), FAVICON) == 0); + EXPECT_FALSE(GetFavicon(row1.url(), FAVICON) == + GetFavicon(row2.url(), FAVICON)); // A URL should not be added to history (to store favicon), if // the URL is not bookmarked. @@ -847,11 +847,11 @@ TEST_F(HistoryBackendTest, SetFaviconMapping) { std::vector<unsigned char> data(blob1, blob1 + sizeof(blob1)); // Add a favicon backend_->SetFavicon( - url1, icon_url, RefCountedBytes::TakeVector(&data), FAV_ICON); + url1, icon_url, RefCountedBytes::TakeVector(&data), FAVICON); EXPECT_TRUE(backend_->thumbnail_db_->GetIconMappingForPageURL( - url1, FAV_ICON, NULL)); + url1, FAVICON, NULL)); EXPECT_TRUE(backend_->thumbnail_db_->GetIconMappingForPageURL( - url2, FAV_ICON, NULL)); + url2, FAVICON, NULL)); // Add a touch_icon backend_->SetFavicon( @@ -861,7 +861,7 @@ TEST_F(HistoryBackendTest, SetFaviconMapping) { EXPECT_TRUE(backend_->thumbnail_db_->GetIconMappingForPageURL( url2, TOUCH_ICON, NULL)); EXPECT_TRUE(backend_->thumbnail_db_->GetIconMappingForPageURL( - url1, FAV_ICON, NULL)); + url1, FAVICON, NULL)); // Add a TOUCH_PRECOMPOSED_ICON backend_->SetFavicon(url1, @@ -872,7 +872,7 @@ TEST_F(HistoryBackendTest, SetFaviconMapping) { EXPECT_FALSE(backend_->thumbnail_db_->GetIconMappingForPageURL( url1, TOUCH_ICON, NULL)); EXPECT_TRUE(backend_->thumbnail_db_->GetIconMappingForPageURL( - url1, FAV_ICON, NULL)); + url1, FAVICON, NULL)); EXPECT_TRUE(backend_->thumbnail_db_->GetIconMappingForPageURL( url1, TOUCH_PRECOMPOSED_ICON, NULL)); EXPECT_TRUE(backend_->thumbnail_db_->GetIconMappingForPageURL( @@ -884,17 +884,17 @@ TEST_F(HistoryBackendTest, SetFaviconMapping) { EXPECT_TRUE(backend_->thumbnail_db_->GetIconMappingForPageURL( url1, TOUCH_ICON, NULL)); EXPECT_TRUE(backend_->thumbnail_db_->GetIconMappingForPageURL( - url1, FAV_ICON, NULL)); + url1, FAVICON, NULL)); // The TOUCH_PRECOMPOSED_ICON was replaced. EXPECT_FALSE(backend_->thumbnail_db_->GetIconMappingForPageURL( url1, TOUCH_PRECOMPOSED_ICON, NULL)); - // Add a fav_icon + // Add a favicon const GURL icon_url2("http://www.google.com/icon2"); backend_->SetFavicon( - url1, icon_url2, RefCountedBytes::TakeVector(&data), FAV_ICON); + url1, icon_url2, RefCountedBytes::TakeVector(&data), FAVICON); FavIconID icon_id = backend_->thumbnail_db_->GetFavIconIDForFavIconURL( - icon_url2, FAV_ICON, NULL); + icon_url2, FAVICON, NULL); EXPECT_NE(0, icon_id); std::vector<IconMapping> icon_mapping; EXPECT_TRUE(backend_->thumbnail_db_->GetIconMappingsForPageURL( @@ -912,14 +912,14 @@ TEST_F(HistoryBackendTest, AddOrUpdateIconMapping) { std::vector<unsigned char> data(blob1, blob1 + sizeof(blob1)); backend_->SetFavicon( - url, icon_url, RefCountedBytes::TakeVector(&data), FAV_ICON); + url, icon_url, RefCountedBytes::TakeVector(&data), FAVICON); FavIconID icon_id = backend_->thumbnail_db_->GetFavIconIDForFavIconURL( - icon_url, FAV_ICON, NULL); + icon_url, FAVICON, NULL); // Add the same mapping FavIconID replaced; EXPECT_FALSE(backend_->AddOrUpdateIconMapping( - url, icon_id, FAV_ICON, &replaced)); + url, icon_id, FAVICON, &replaced)); EXPECT_EQ(0, replaced); std::vector<IconMapping> icon_mapping; diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h index f38472b..b0da587 100644 --- a/chrome/browser/history/history_types.h +++ b/chrome/browser/history/history_types.h @@ -680,7 +680,7 @@ bool RowQualifiesAsSignificant(const URLRow& row, const base::Time& threshold); // table. enum IconType { INVALID_ICON = 0x0, - FAV_ICON = 1 << 0, + FAVICON = 1 << 0, TOUCH_ICON = 1 << 1, TOUCH_PRECOMPOSED_ICON = 1 << 2 }; diff --git a/chrome/browser/history/thumbnail_database.cc b/chrome/browser/history/thumbnail_database.cc index 2ec82ed..c50d998 100644 --- a/chrome/browser/history/thumbnail_database.cc +++ b/chrome/browser/history/thumbnail_database.cc @@ -204,7 +204,7 @@ bool ThumbnailDatabase::InitFavIconsTable(sql::Connection* db, "url LONGVARCHAR NOT NULL," "last_updated INTEGER DEFAULT 0," "image_data BLOB," - "icon_type INTEGER DEFAULT 1)"); // Set the default as FAV_ICON + "icon_type INTEGER DEFAULT 1)"); // Set the default as FAVICON // to be consistent with table // upgrade in // UpgradeToVersion4(). diff --git a/chrome/browser/history/thumbnail_database.h b/chrome/browser/history/thumbnail_database.h index 2842b34..e88e737 100644 --- a/chrome/browser/history/thumbnail_database.h +++ b/chrome/browser/history/thumbnail_database.h @@ -109,7 +109,7 @@ class ThumbnailDatabase { // and icon type. If |required_icon_type| contains multiple icon types and // there are more than one matched icon in database, only one icon will be // returned in the priority of TOUCH_PRECOMPOSED_ICON, TOUCH_ICON, and - // FAV_ICON, and the icon type is returned in icon_type parameter if it is not + // FAVICON, and the icon type is returned in icon_type parameter if it is not // NULL. // Returns 0 if no entry exists for the specified url. FavIconID GetFavIconIDForFavIconURL(const GURL& icon_url, diff --git a/chrome/browser/history/thumbnail_database_unittest.cc b/chrome/browser/history/thumbnail_database_unittest.cc index ecce8d2..dd07dcb 100644 --- a/chrome/browser/history/thumbnail_database_unittest.cc +++ b/chrome/browser/history/thumbnail_database_unittest.cc @@ -119,7 +119,7 @@ TEST_F(ThumbnailDatabaseTest, GetFaviconAfterMigrationToTopSites) { scoped_refptr<RefCountedBytes> favicon(new RefCountedBytes(data)); GURL url("http://google.com"); - FavIconID id = db.AddFavIcon(url, FAV_ICON); + FavIconID id = db.AddFavIcon(url, FAVICON); base::Time time = base::Time::Now(); db.SetFavicon(id, favicon, time); EXPECT_TRUE(db.RenameAndDropThumbnails(file_name_, new_file_name_)); @@ -204,7 +204,7 @@ TEST_F(ThumbnailDatabaseTest, DeleteIconMappings) { db.SetFavicon(id, favicon, time); EXPECT_TRUE(0 < db.AddIconMapping(url, id)); - FavIconID id2 = db.AddFavIcon(url, FAV_ICON); + FavIconID id2 = db.AddFavIcon(url, FAVICON); db.SetFavicon(id2, favicon, time); EXPECT_TRUE(0 < db.AddIconMapping(url, id2)); ASSERT_NE(id, id2); @@ -213,12 +213,12 @@ TEST_F(ThumbnailDatabaseTest, DeleteIconMappings) { EXPECT_TRUE(db.GetIconMappingsForPageURL(url, &icon_mapping)); ASSERT_EQ(2u, icon_mapping.size()); EXPECT_EQ(icon_mapping.front().icon_type, TOUCH_ICON); - EXPECT_TRUE(db.GetIconMappingForPageURL(url, FAV_ICON, NULL)); + EXPECT_TRUE(db.GetIconMappingForPageURL(url, FAVICON, NULL)); db.DeleteIconMappings(url); EXPECT_FALSE(db.GetIconMappingsForPageURL(url, NULL)); - EXPECT_FALSE(db.GetIconMappingForPageURL(url, FAV_ICON, NULL)); + EXPECT_FALSE(db.GetIconMappingForPageURL(url, FAVICON, NULL)); } TEST_F(ThumbnailDatabaseTest, GetIconMappingsForPageURL) { @@ -236,7 +236,7 @@ TEST_F(ThumbnailDatabaseTest, GetIconMappingsForPageURL) { db.SetFavicon(id1, favicon, time); EXPECT_TRUE(0 < db.AddIconMapping(url, id1)); - FavIconID id2 = db.AddFavIcon(url, FAV_ICON); + FavIconID id2 = db.AddFavIcon(url, FAVICON); EXPECT_NE(id1, id2); db.SetFavicon(id2, favicon, time); EXPECT_TRUE(0 < db.AddIconMapping(url, id2)); @@ -299,14 +299,14 @@ TEST_F(ThumbnailDatabaseTest, TemporayIconMapping) { scoped_refptr<RefCountedBytes> favicon(new RefCountedBytes(data)); GURL url("http://google.com"); - FavIconID id = db.AddFavIcon(url, FAV_ICON); + FavIconID id = db.AddFavIcon(url, FAVICON); base::Time time = base::Time::Now(); db.SetFavicon(id, favicon, time); db.AddToTemporaryIconMappingTable(url, id); db.CommitTemporaryIconMappingTable(); IconMapping icon_mapping; - EXPECT_TRUE(db.GetIconMappingForPageURL(url, FAV_ICON, &icon_mapping)); + EXPECT_TRUE(db.GetIconMappingForPageURL(url, FAVICON, &icon_mapping)); EXPECT_EQ(id, icon_mapping.icon_id); EXPECT_EQ(url, icon_mapping.page_url); } @@ -321,7 +321,7 @@ TEST_F(ThumbnailDatabaseTest, GetIconMappingsForPageURLForReturnOrder) { scoped_refptr<RefCountedBytes> favicon(new RefCountedBytes(data)); GURL url("http://google.com"); - FavIconID id = db.AddFavIcon(url, FAV_ICON); + FavIconID id = db.AddFavIcon(url, FAVICON); base::Time time = base::Time::Now(); db.SetFavicon(id, favicon, time); @@ -331,7 +331,7 @@ TEST_F(ThumbnailDatabaseTest, GetIconMappingsForPageURLForReturnOrder) { EXPECT_EQ(url, icon_mapping.front().page_url); EXPECT_EQ(id, icon_mapping.front().icon_id); - EXPECT_EQ(FAV_ICON, icon_mapping.front().icon_type); + EXPECT_EQ(FAVICON, icon_mapping.front().icon_type); // Add a touch icon std::vector<unsigned char> data2(blob2, blob2 + sizeof(blob2)); @@ -372,7 +372,7 @@ TEST_F(ThumbnailDatabaseTest, HasMappingFor) { scoped_refptr<RefCountedBytes> favicon(new RefCountedBytes(data)); // Add a favicon which will have icon_mappings - FavIconID id1 = db.AddFavIcon(GURL("http://google.com"), FAV_ICON); + FavIconID id1 = db.AddFavIcon(GURL("http://google.com"), FAVICON); EXPECT_NE(id1, 0); base::Time time = base::Time::Now(); db.SetFavicon(id1, favicon, time); @@ -423,7 +423,7 @@ TEST_F(IconMappingMigrationTest, TestIconMappingMigration) { std::vector<IconMapping> icon_mappings; EXPECT_TRUE(db.GetIconMappingsForPageURL(page_url1, &icon_mappings)); ASSERT_EQ(1u, icon_mappings.size()); - EXPECT_EQ(FAV_ICON, icon_mappings[0].icon_type); + EXPECT_EQ(FAVICON, icon_mappings[0].icon_type); EXPECT_EQ(page_url1, icon_mappings[0].page_url); EXPECT_EQ(1, icon_mappings[0].icon_id); base::Time time; @@ -438,7 +438,7 @@ TEST_F(IconMappingMigrationTest, TestIconMappingMigration) { icon_mappings.clear(); EXPECT_TRUE(db.GetIconMappingsForPageURL(page_url3, &icon_mappings)); ASSERT_EQ(1u, icon_mappings.size()); - EXPECT_EQ(FAV_ICON, icon_mappings[0].icon_type); + EXPECT_EQ(FAVICON, icon_mappings[0].icon_type); EXPECT_EQ(page_url3, icon_mappings[0].page_url); EXPECT_EQ(1, icon_mappings[0].icon_id); @@ -447,7 +447,7 @@ TEST_F(IconMappingMigrationTest, TestIconMappingMigration) { icon_mappings.clear(); EXPECT_TRUE(db.GetIconMappingsForPageURL(page_url2, &icon_mappings)); ASSERT_EQ(1u, icon_mappings.size()); - EXPECT_EQ(FAV_ICON, icon_mappings[0].icon_type); + EXPECT_EQ(FAVICON, icon_mappings[0].icon_type); EXPECT_EQ(page_url2, icon_mappings[0].page_url); EXPECT_EQ(2, icon_mappings[0].icon_id); ASSERT_TRUE(db.GetFavicon( diff --git a/chrome/browser/importer/external_process_importer_client.cc b/chrome/browser/importer/external_process_importer_client.cc index 59a785a..a4ddeee 100644 --- a/chrome/browser/importer/external_process_importer_client.cc +++ b/chrome/browser/importer/external_process_importer_client.cc @@ -21,7 +21,7 @@ ExternalProcessImporterClient::ExternalProcessImporterClient( : bookmarks_options_(0), total_bookmarks_count_(0), total_history_rows_count_(0), - total_fav_icons_count_(0), + total_favicons_count_(0), process_importer_host_(importer_host), profile_import_process_host_(NULL), profile_info_(profile_info), @@ -192,23 +192,23 @@ void ExternalProcessImporterClient::OnBookmarksImportGroup( } void ExternalProcessImporterClient::OnFavIconsImportStart( - size_t total_fav_icons_count) { + size_t total_favicons_count) { if (cancelled_) return; - total_fav_icons_count_ = total_fav_icons_count; - fav_icons_.reserve(total_fav_icons_count); + total_favicons_count_ = total_favicons_count; + favicons_.reserve(total_favicons_count); } void ExternalProcessImporterClient::OnFavIconsImportGroup( - const std::vector<history::ImportedFavIconUsage>& fav_icons_group) { + const std::vector<history::ImportedFavIconUsage>& favicons_group) { if (cancelled_) return; - fav_icons_.insert(fav_icons_.end(), fav_icons_group.begin(), - fav_icons_group.end()); - if (fav_icons_.size() == total_fav_icons_count_) - bridge_->SetFavicons(fav_icons_); + favicons_.insert(favicons_.end(), favicons_group.begin(), + favicons_group.end()); + if (favicons_.size() == total_favicons_count_) + bridge_->SetFavicons(favicons_); } void ExternalProcessImporterClient::OnPasswordFormImportReady( diff --git a/chrome/browser/importer/external_process_importer_client.h b/chrome/browser/importer/external_process_importer_client.h index 4fe9f32..540cf65 100644 --- a/chrome/browser/importer/external_process_importer_client.h +++ b/chrome/browser/importer/external_process_importer_client.h @@ -91,13 +91,13 @@ class ExternalProcessImporterClient const std::vector<ProfileWriter::BookmarkEntry>& bookmarks_group) OVERRIDE; - // First message received when importing favicons. |total_fav_icons_size| + // First message received when importing favicons. |total_favicons_size| // gives the total number of favicons to be imported. - virtual void OnFavIconsImportStart(size_t total_fav_icons_count) OVERRIDE; + virtual void OnFavIconsImportStart(size_t total_favicons_count) OVERRIDE; // Called when a group of favicons has been received. virtual void OnFavIconsImportGroup( - const std::vector<history::ImportedFavIconUsage>& fav_icons_group) + const std::vector<history::ImportedFavIconUsage>& favicons_group) OVERRIDE; // Called when the passwordform has been received. @@ -117,7 +117,7 @@ class ExternalProcessImporterClient // entire group has been collected and is ready to be written to the profile. std::vector<history::URLRow> history_rows_; std::vector<ProfileWriter::BookmarkEntry> bookmarks_; - std::vector<history::ImportedFavIconUsage> fav_icons_; + std::vector<history::ImportedFavIconUsage> favicons_; // Usually some variation on IDS_BOOKMARK_GROUP_...; the name of the folder // under which imported bookmarks will be placed. @@ -133,7 +133,7 @@ class ExternalProcessImporterClient size_t total_history_rows_count_; // Total number of favicons to import. - size_t total_fav_icons_count_; + size_t total_favicons_count_; // Notifications received from the ProfileImportProcessHost are passed back // to process_importer_host_, which calls the ProfileWriter to record the diff --git a/chrome/browser/importer/importer_bridge.cc b/chrome/browser/importer/importer_bridge.cc index c7afd1a..39b95d5 100644 --- a/chrome/browser/importer/importer_bridge.cc +++ b/chrome/browser/importer/importer_bridge.cc @@ -58,10 +58,10 @@ void InProcessImporterBridge::AddIE7PasswordInfo( #endif // OS_WIN void InProcessImporterBridge::SetFavicons( - const std::vector<history::ImportedFavIconUsage>& fav_icons) { + const std::vector<history::ImportedFavIconUsage>& favicons) { BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, - NewRunnableMethod(writer_, &ProfileWriter::AddFavicons, fav_icons)); + NewRunnableMethod(writer_, &ProfileWriter::AddFavicons, favicons)); } void InProcessImporterBridge::SetHistoryItems( @@ -152,8 +152,8 @@ void ExternalProcessImporterBridge::AddIE7PasswordInfo( #endif void ExternalProcessImporterBridge::SetFavicons( - const std::vector<history::ImportedFavIconUsage>& fav_icons) { - profile_import_thread_->NotifyFavIconsImportReady(fav_icons); + const std::vector<history::ImportedFavIconUsage>& favicons) { + profile_import_thread_->NotifyFavIconsImportReady(favicons); } void ExternalProcessImporterBridge::SetHistoryItems( diff --git a/chrome/browser/importer/importer_bridge.h b/chrome/browser/importer/importer_bridge.h index 335dcc9..32f7e1c 100644 --- a/chrome/browser/importer/importer_bridge.h +++ b/chrome/browser/importer/importer_bridge.h @@ -34,7 +34,7 @@ class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> { #endif virtual void SetFavicons( - const std::vector<history::ImportedFavIconUsage>& fav_icons) = 0; + const std::vector<history::ImportedFavIconUsage>& favicons) = 0; virtual void SetHistoryItems(const std::vector<history::URLRow> &rows, history::VisitSource visit_source) = 0; virtual void SetKeywords(const std::vector<TemplateURL*> &template_urls, @@ -92,7 +92,7 @@ class InProcessImporterBridge : public ImporterBridge { #endif virtual void SetFavicons( - const std::vector<history::ImportedFavIconUsage>& fav_icons); + const std::vector<history::ImportedFavIconUsage>& favicons); virtual void SetHistoryItems(const std::vector<history::URLRow> &rows, history::VisitSource visit_source); virtual void SetKeywords(const std::vector<TemplateURL*>& template_urls, @@ -138,7 +138,7 @@ class ExternalProcessImporterBridge : public ImporterBridge { #endif virtual void SetFavicons( - const std::vector<history::ImportedFavIconUsage>& fav_icons); + const std::vector<history::ImportedFavIconUsage>& favicons); virtual void SetHistoryItems(const std::vector<history::URLRow> &rows, history::VisitSource visit_source); virtual void SetKeywords(const std::vector<TemplateURL*>& template_urls, diff --git a/chrome/browser/jumplist_win.cc b/chrome/browser/jumplist_win.cc index 501852d..e73f134 100644 --- a/chrome/browser/jumplist_win.cc +++ b/chrome/browser/jumplist_win.cc @@ -688,7 +688,7 @@ bool JumpList::StartLoadingFavIcon() { FaviconService* favicon_service = profile_->GetFaviconService(Profile::EXPLICIT_ACCESS); FaviconService::Handle handle = favicon_service->GetFaviconForURL( - url, &fav_icon_consumer_, + url, &favicon_consumer_, NewCallback(this, &JumpList::OnFavIconDataAvailable)); return true; } diff --git a/chrome/browser/jumplist_win.h b/chrome/browser/jumplist_win.h index 8bd7b4c..50035a7 100644 --- a/chrome/browser/jumplist_win.h +++ b/chrome/browser/jumplist_win.h @@ -168,7 +168,7 @@ class JumpList : public TabRestoreServiceObserver { private: // Our consumers for HistoryService. CancelableRequestConsumer most_visited_consumer_; - CancelableRequestConsumer fav_icon_consumer_; + CancelableRequestConsumer favicon_consumer_; // The Profile object used for listening its events. Profile* profile_; diff --git a/chrome/browser/possible_url_model.cc b/chrome/browser/possible_url_model.cc index 73e9b46..d2f907e 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); } } diff --git a/chrome/browser/possible_url_model.h b/chrome/browser/possible_url_model.h index 338a4e2..2a6e0ad0 100644 --- a/chrome/browser/possible_url_model.h +++ b/chrome/browser/possible_url_model.h @@ -37,7 +37,7 @@ class PossibleURLModel : public ui::TableModel { const std::wstring& GetTitle(int row); virtual void OnFavIconAvailable(FaviconService::Handle h, - bool fav_icon_available, + bool favicon_available, scoped_refptr<RefCountedMemory> data, bool expired, GURL icon_url); @@ -65,7 +65,7 @@ class PossibleURLModel : public ui::TableModel { // Map Result::index -> Favicon. typedef std::map<size_t, SkBitmap> FavIconMap; - FavIconMap fav_icon_map_; + FavIconMap favicon_map_; DISALLOW_COPY_AND_ASSIGN(PossibleURLModel); }; diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc index 8f7aec1..5204729 100644 --- a/chrome/browser/prerender/prerender_manager.cc +++ b/chrome/browser/prerender/prerender_manager.cc @@ -165,7 +165,7 @@ bool PrerenderManager::MaybeUsePreloadedPage(TabContents* tc, const GURL& url) { GURL icon_url = pc->icon_url(); if (!icon_url.is_empty()) - tc->fav_icon_helper().OnUpdateFaviconURL(pc->page_id(), icon_url); + tc->favicon_helper().OnUpdateFaviconURL(pc->page_id(), icon_url); if (pc->has_stopped_loading()) tc->DidStopLoading(); diff --git a/chrome/browser/profile_import_process_host.h b/chrome/browser/profile_import_process_host.h index a90bf21..cea7ca5 100644 --- a/chrome/browser/profile_import_process_host.h +++ b/chrome/browser/profile_import_process_host.h @@ -62,9 +62,9 @@ class ProfileImportProcessHost : public BrowserChildProcessHost { virtual void OnBookmarksImportGroup( const std::vector<ProfileWriter::BookmarkEntry>& bookmarks) {} - virtual void OnFavIconsImportStart(size_t total_fav_icons_count) {} + virtual void OnFavIconsImportStart(size_t total_favicons_count) {} virtual void OnFavIconsImportGroup( - const std::vector<history::ImportedFavIconUsage>& fav_icons_group) {} + const std::vector<history::ImportedFavIconUsage>& favicons_group) {} virtual void OnPasswordFormImportReady( const webkit_glue::PasswordForm& form) {} diff --git a/chrome/browser/search_engines/template_url_model_unittest.cc b/chrome/browser/search_engines/template_url_model_unittest.cc index 40b0ffc81..b66d3a0 100644 --- a/chrome/browser/search_engines/template_url_model_unittest.cc +++ b/chrome/browser/search_engines/template_url_model_unittest.cc @@ -120,7 +120,7 @@ class TemplateURLModelTest : public testing::Test { bool autogenerate_keyword, const std::string& url, const std::string& suggest_url, - const std::string& fav_icon_url, + const std::string& favicon_url, const std::string& encodings, const std::string& short_name, bool safe_for_autoreplace, @@ -128,7 +128,7 @@ class TemplateURLModelTest : public testing::Test { TemplateURL* template_url = new TemplateURL(); template_url->SetURL(url, 0, 0); template_url->SetSuggestionsURL(suggest_url, 0, 0); - template_url->SetFaviconURL(GURL(fav_icon_url)); + template_url->SetFaviconURL(GURL(favicon_url)); template_url->set_keyword(UTF8ToUTF16(keyword)); template_url->set_autogenerate_keyword(autogenerate_keyword); template_url->set_short_name(UTF8ToUTF16(short_name)); diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc index 382fe01..af4b80f 100644 --- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc +++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc @@ -77,7 +77,7 @@ const SkScalar kTabBottomCurveWidth = 3; const int kCloseButtonVertFuzz = 0; const int kCloseButtonHorzFuzz = 5; -SkBitmap* crashed_fav_icon = NULL; +SkBitmap* crashed_favicon = NULL; // Gets the bounds of |widget| relative to |parent|. gfx::Rect GetWidgetBoundsRelativeToParent(GtkWidget* parent, @@ -249,7 +249,7 @@ class TabRendererGtk::FavIconCrashAnimation : public ui::LinearAnimation, TabRendererGtk::TabRendererGtk(ui::ThemeProvider* theme_provider) : showing_icon_(false), showing_close_button_(false), - fav_icon_hiding_offset_(0), + favicon_hiding_offset_(0), should_display_crashed_favicon_(false), loading_animation_(theme_provider), background_offset_x_(0), @@ -605,7 +605,7 @@ bool TabRendererGtk::IsPerformingCrashAnimation() const { } void TabRendererGtk::SetFaviconHidingOffset(int offset) { - fav_icon_hiding_offset_ = offset; + favicon_hiding_offset_ = offset; SchedulePaint(); } @@ -828,11 +828,11 @@ void TabRendererGtk::PaintIcon(gfx::Canvas* canvas) { canvas->Save(); canvas->ClipRectInt(0, 0, width(), height() - kFavIconTitleSpacing); if (should_display_crashed_favicon_) { - canvas->DrawBitmapInt(*crashed_fav_icon, 0, 0, - crashed_fav_icon->width(), - crashed_fav_icon->height(), + canvas->DrawBitmapInt(*crashed_favicon, 0, 0, + crashed_favicon->width(), + crashed_favicon->height(), favicon_bounds_.x(), - favicon_bounds_.y() + fav_icon_hiding_offset_, + favicon_bounds_.y() + favicon_hiding_offset_, kFaviconSize, kFaviconSize, true); } else { @@ -841,7 +841,7 @@ void TabRendererGtk::PaintIcon(gfx::Canvas* canvas) { GdkPixbuf* favicon = GtkThemeProvider::GetDefaultFavicon(true); canvas->AsCanvasSkia()->DrawGdkPixbuf( favicon, favicon_bounds_.x(), - favicon_bounds_.y() + fav_icon_hiding_offset_); + favicon_bounds_.y() + favicon_hiding_offset_); } else { // If the favicon is an app icon, it is allowed to be drawn slightly // larger than the standard favicon. @@ -859,7 +859,7 @@ void TabRendererGtk::PaintIcon(gfx::Canvas* canvas) { favicon_bounds_.x() - favIconWidthDelta/2, favicon_bounds_.y() + favIconHeightOffset - favIconHeightDelta/2 - + fav_icon_hiding_offset_, + + favicon_hiding_offset_, kFaviconSize + favIconWidthDelta, kFaviconSize + favIconHeightDelta, true); @@ -1083,7 +1083,7 @@ void TabRendererGtk::InitResources() { title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize); title_font_height_ = title_font_->GetHeight(); - crashed_fav_icon = rb.GetBitmapNamed(IDR_SAD_FAVICON); + crashed_favicon = rb.GetBitmapNamed(IDR_SAD_FAVICON); initialized_ = true; } diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h index 54e8f65..0ffb763 100644 --- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h +++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h @@ -407,7 +407,7 @@ class TabRendererGtk : public ui::AnimationDelegate, bool showing_close_button_; // The offset used to animate the favicon location. - int fav_icon_hiding_offset_; + int favicon_hiding_offset_; // The animation object used to swap the favicon with the sad tab icon. scoped_ptr<FavIconCrashAnimation> crash_animation_; diff --git a/chrome/browser/ui/search_engines/template_url_table_model.cc b/chrome/browser/ui/search_engines/template_url_table_model.cc index 6c82c85..4cdcda2 100644 --- a/chrome/browser/ui/search_engines/template_url_table_model.cc +++ b/chrome/browser/ui/search_engines/template_url_table_model.cc @@ -52,8 +52,8 @@ class ModelEntry { SkBitmap GetIcon() { if (load_state_ == NOT_LOADED) LoadFavIcon(); - if (!fav_icon_.isNull()) - return fav_icon_; + if (!favicon_.isNull()) + return favicon_; return *default_icon; } @@ -61,7 +61,7 @@ class ModelEntry { // fetched again. This should be invoked if the url is modified. void ResetIcon() { load_state_ = NOT_LOADED; - fav_icon_ = SkBitmap(); + favicon_ = SkBitmap(); } private: @@ -79,19 +79,19 @@ class ModelEntry { Profile::EXPLICIT_ACCESS); if (!favicon_service) return; - GURL fav_icon_url = template_url().GetFavIconURL(); - if (!fav_icon_url.is_valid()) { + GURL favicon_url = template_url().GetFavIconURL(); + if (!favicon_url.is_valid()) { // The favicon url isn't always set. Guess at one here. if (template_url_.url() && template_url_.url()->IsValid()) { GURL url = GURL(template_url_.url()->url()); if (url.is_valid()) - fav_icon_url = TemplateURL::GenerateFaviconURL(url); + favicon_url = TemplateURL::GenerateFaviconURL(url); } - if (!fav_icon_url.is_valid()) + if (!favicon_url.is_valid()) return; } load_state_ = LOADING; - favicon_service->GetFavicon(fav_icon_url, + favicon_service->GetFavicon(favicon_url, &request_consumer_, NewCallback(this, &ModelEntry::OnFavIconDataAvailable)); } @@ -104,13 +104,13 @@ class ModelEntry { GURL icon_url) { load_state_ = LOADED; if (know_favicon && data.get() && - gfx::PNGCodec::Decode(data->front(), data->size(), &fav_icon_)) { + gfx::PNGCodec::Decode(data->front(), data->size(), &favicon_)) { model_->FavIconAvailable(this); } } const TemplateURL& template_url_; - SkBitmap fav_icon_; + SkBitmap favicon_; LoadState load_state_; TemplateURLTableModel* model_; CancelableRequestConsumer request_consumer_; diff --git a/chrome/browser/ui/touch/tabs/touch_tab.cc b/chrome/browser/ui/touch/tabs/touch_tab.cc index e2968c1..f595771 100644 --- a/chrome/browser/ui/touch/tabs/touch_tab.cc +++ b/chrome/browser/ui/touch/tabs/touch_tab.cc @@ -193,15 +193,15 @@ void TouchTab::PaintIcon(gfx::Canvas* canvas) { canvas->ClipRectInt(0, 0, width(), height()); if (should_display_crashed_favicon()) { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - SkBitmap crashed_fav_icon(*rb.GetBitmapNamed(IDR_SAD_FAVICON)); - canvas->DrawBitmapInt(crashed_fav_icon, 0, 0, crashed_fav_icon.width(), - crashed_fav_icon.height(), x, y + fav_icon_hiding_offset(), + SkBitmap crashed_favicon(*rb.GetBitmapNamed(IDR_SAD_FAVICON)); + canvas->DrawBitmapInt(crashed_favicon, 0, 0, crashed_favicon.width(), + crashed_favicon.height(), x, y + favicon_hiding_offset(), kTouchFaviconSize, kTouchFaviconSize, true); } else { if (!data().favicon.isNull()) { canvas->DrawBitmapInt(data().favicon, 0, 0, data().favicon.width(), data().favicon.height(), - x, y + fav_icon_hiding_offset(), + x, y + favicon_hiding_offset(), kTouchFaviconSize, kTouchFaviconSize, true); } } diff --git a/chrome/browser/ui/views/create_application_shortcut_view.cc b/chrome/browser/ui/views/create_application_shortcut_view.cc index d935ab7..b722006 100644 --- a/chrome/browser/ui/views/create_application_shortcut_view.cc +++ b/chrome/browser/ui/views/create_application_shortcut_view.cc @@ -447,7 +447,7 @@ void CreateUrlApplicationShortcutView::FetchIcon() { pending_download_ = new IconDownloadCallbackFunctor(this); DCHECK(pending_download_); - tab_contents_->fav_icon_helper().DownloadImage( + tab_contents_->favicon_helper().DownloadImage( unprocessed_icons_.back().url, std::max(unprocessed_icons_.back().width, unprocessed_icons_.back().height), diff --git a/chrome/browser/ui/views/tab_icon_view.cc b/chrome/browser/ui/views/tab_icon_view.cc index 8b2e094..511af61e 100644 --- a/chrome/browser/ui/views/tab_icon_view.cc +++ b/chrome/browser/ui/views/tab_icon_view.cc @@ -25,7 +25,7 @@ #endif static bool g_initialized = false; -static SkBitmap* g_default_fav_icon = NULL; +static SkBitmap* g_default_favicon = NULL; // static void TabIconView::InitializeIfNeeded() { @@ -36,11 +36,11 @@ void TabIconView::InitializeIfNeeded() { // The default window icon is the application icon, not the default // favicon. HICON app_icon = GetAppIcon(); - g_default_fav_icon = + g_default_favicon = IconUtil::CreateSkBitmapFromHICON(app_icon, gfx::Size(16, 16)); DestroyIcon(app_icon); #else - g_default_fav_icon = + g_default_favicon = ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_PRODUCT_LOGO_16); #endif } @@ -147,7 +147,7 @@ void TabIconView::OnPaint(gfx::Canvas* canvas) { } if (!rendered) - PaintFavIcon(canvas, *g_default_fav_icon); + PaintFavIcon(canvas, *g_default_favicon); } gfx::Size TabIconView::GetPreferredSize() { diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc index 645a60b..9f7c658 100644 --- a/chrome/browser/ui/views/tabs/base_tab.cc +++ b/chrome/browser/ui/views/tabs/base_tab.cc @@ -144,7 +144,7 @@ BaseTab::BaseTab(TabController* controller) : controller_(controller), closing_(false), dragging_(false), - fav_icon_hiding_offset_(0), + favicon_hiding_offset_(0), loading_animation_frame_(0), should_display_crashed_favicon_(false), throbber_disabled_(false), @@ -439,11 +439,11 @@ void BaseTab::PaintIcon(gfx::Canvas* canvas) { canvas->ClipRectInt(0, 0, width(), height()); if (should_display_crashed_favicon_) { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - SkBitmap crashed_fav_icon(*rb.GetBitmapNamed(IDR_SAD_FAVICON)); - bounds.set_y(bounds.y() + fav_icon_hiding_offset_); - DrawIconCenter(canvas, crashed_fav_icon, 0, - crashed_fav_icon.width(), - crashed_fav_icon.height(), bounds, true); + SkBitmap crashed_favicon(*rb.GetBitmapNamed(IDR_SAD_FAVICON)); + bounds.set_y(bounds.y() + favicon_hiding_offset_); + DrawIconCenter(canvas, crashed_favicon, 0, + crashed_favicon.width(), + crashed_favicon.height(), bounds, true); } else { if (!data().favicon.isNull()) { // TODO(pkasting): Use code in tab_icon_view.cc:PaintIcon() (or switch @@ -514,12 +514,12 @@ bool BaseTab::should_display_crashed_favicon() const { return should_display_crashed_favicon_; } -int BaseTab::fav_icon_hiding_offset() const { - return fav_icon_hiding_offset_; +int BaseTab::favicon_hiding_offset() const { + return favicon_hiding_offset_; } void BaseTab::SetFaviconHidingOffset(int offset) { - fav_icon_hiding_offset_ = offset; + favicon_hiding_offset_ = offset; ScheduleIconPaint(); } diff --git a/chrome/browser/ui/views/tabs/base_tab.h b/chrome/browser/ui/views/tabs/base_tab.h index 5d5b691..10efd1f 100644 --- a/chrome/browser/ui/views/tabs/base_tab.h +++ b/chrome/browser/ui/views/tabs/base_tab.h @@ -139,7 +139,7 @@ class BaseTab : public ui::AnimationDelegate, virtual int loading_animation_frame() const; virtual bool should_display_crashed_favicon() const; - virtual int fav_icon_hiding_offset() const; + virtual int favicon_hiding_offset() const; static gfx::Font* font() { return font_; } static int font_height() { return font_height_; } @@ -181,7 +181,7 @@ class BaseTab : public ui::AnimationDelegate, // The offset used to animate the favicon location. This is used when the tab // crashes. - int fav_icon_hiding_offset_; + int favicon_hiding_offset_; // The current index of the loading animation. int loading_animation_frame_; diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc index 4ca7fa3..8915277 100644 --- a/chrome/browser/web_applications/web_app.cc +++ b/chrome/browser/web_applications/web_app.cc @@ -553,7 +553,7 @@ void UpdateShortcutWorker::DownloadIcon() { return; } - tab_contents_->fav_icon_helper().DownloadImage( + tab_contents_->favicon_helper().DownloadImage( unprocessed_icons_.back().url, std::max(unprocessed_icons_.back().width, unprocessed_icons_.back().height), diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index aeaa6aa..25c7c88 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -742,8 +742,8 @@ 'browser/chromeos/wm_message_listener.h', 'browser/chromeos/wm_overview_controller.cc', 'browser/chromeos/wm_overview_controller.h', - 'browser/chromeos/wm_overview_fav_icon.cc', - 'browser/chromeos/wm_overview_fav_icon.h', + 'browser/chromeos/wm_overview_favicon.cc', + 'browser/chromeos/wm_overview_favicon.h', 'browser/chromeos/wm_overview_snapshot.cc', 'browser/chromeos/wm_overview_snapshot.h', 'browser/chromeos/wm_overview_title.cc', diff --git a/chrome/profile_import/profile_import_thread.cc b/chrome/profile_import/profile_import_thread.cc index 14c66f6..a7dd12f 100644 --- a/chrome/profile_import/profile_import_thread.cc +++ b/chrome/profile_import/profile_import_thread.cc @@ -157,20 +157,20 @@ void ProfileImportThread::NotifyBookmarksImportReady( } void ProfileImportThread::NotifyFavIconsImportReady( - const std::vector<history::ImportedFavIconUsage>& fav_icons) { + const std::vector<history::ImportedFavIconUsage>& favicons) { Send(new ProfileImportProcessHostMsg_NotifyFavIconsImportStart( - fav_icons.size())); + favicons.size())); std::vector<history::ImportedFavIconUsage>::const_iterator it; - for (it = fav_icons.begin(); it < fav_icons.end(); + for (it = favicons.begin(); it < favicons.end(); it = it + kNumFavIconsToSend) { - std::vector<history::ImportedFavIconUsage> fav_icons_group; + std::vector<history::ImportedFavIconUsage> favicons_group; std::vector<history::ImportedFavIconUsage>::const_iterator end_group = - std::min(it + kNumFavIconsToSend, fav_icons.end()); - fav_icons_group.assign(it, end_group); + std::min(it + kNumFavIconsToSend, favicons.end()); + favicons_group.assign(it, end_group); Send(new ProfileImportProcessHostMsg_NotifyFavIconsImportGroup( - fav_icons_group)); + favicons_group)); } } diff --git a/chrome/profile_import/profile_import_thread.h b/chrome/profile_import/profile_import_thread.h index 3fd1fd8..c3fd7b0 100644 --- a/chrome/profile_import/profile_import_thread.h +++ b/chrome/profile_import/profile_import_thread.h @@ -49,7 +49,7 @@ class ProfileImportThread : public ChildThread { const std::vector<ProfileWriter::BookmarkEntry>& bookmarks, const std::wstring& first_folder_name, int options); void NotifyFavIconsImportReady( - const std::vector<history::ImportedFavIconUsage>& fav_icons); + const std::vector<history::ImportedFavIconUsage>& favicons); void NotifyPasswordFormReady(const webkit_glue::PasswordForm& form); void NotifyKeywordsReady(const std::vector<TemplateURL*>& template_urls, int default_keyword_index, bool unique_on_host_and_path); |