diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 14:51:02 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 14:51:02 +0000 |
commit | 5976255eccb8c585c4e5ed0fefe4144d62bd1f74 (patch) | |
tree | 423aed3fd49ef18a06dc69528bdce15337c77d31 | |
parent | f23a8c18ba3ef2d366479f6b94021d75b49e9e37 (diff) | |
download | chromium_src-5976255eccb8c585c4e5ed0fefe4144d62bd1f74.zip chromium_src-5976255eccb8c585c4e5ed0fefe4144d62bd1f74.tar.gz chromium_src-5976255eccb8c585c4e5ed0fefe4144d62bd1f74.tar.bz2 |
fav icon -> favicon. Pass 4: SetFavIcon* -> SetFavicon*
BUG=76073
TEST=none; no visible change
Review URL: http://codereview.chromium.org/6683052
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78210 0039d316-1c4b-4281-b951-d872f2087c98
35 files changed, 99 insertions, 99 deletions
diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc index a3c0c3b..07c27c3 100644 --- a/chrome/browser/aeropeek_manager.cc +++ b/chrome/browser/aeropeek_manager.cc @@ -588,7 +588,7 @@ class AeroPeekWindow : public ui::WindowImpl { // saves a copy of the given bitmap since it takes time to create a Windows // icon from this bitmap set it as the window icon. We will create a Windows // when Windows sends a WM_GETICON message to retrieve it. - void SetFavIcon(const SkBitmap& favicon); + void SetFavicon(const SkBitmap& favicon); // Returns the tab ID associated with this window. int tab_id() { return tab_id_; } @@ -805,7 +805,7 @@ void AeroPeekWindow::SetTitle(const std::wstring& title) { title_ = title; } -void AeroPeekWindow::SetFavIcon(const SkBitmap& favicon) { +void AeroPeekWindow::SetFavicon(const SkBitmap& favicon) { favicon_bitmap_ = favicon; } @@ -1174,7 +1174,7 @@ void AeroPeekManager::TabChangedAt(TabContentsWrapper* contents, // hurting the rendering performance. (These functions just save the // information needed for handling update requests from Windows.) window->SetTitle(contents->tab_contents()->GetTitle()); - window->SetFavIcon(contents->tab_contents()->GetFavicon()); + window->SetFavicon(contents->tab_contents()->GetFavicon()); window->Update(contents->tab_contents()->is_loading()); } diff --git a/chrome/browser/chromeos/wm_overview_controller.cc b/chrome/browser/chromeos/wm_overview_controller.cc index e79d360..656a077 100644 --- a/chrome/browser/chromeos/wm_overview_controller.cc +++ b/chrome/browser/chromeos/wm_overview_controller.cc @@ -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].fav_icon->SetFavicon( contents->tab_contents()->GetFavicon()); if (change_type != TabStripModelObserver::TITLE_NOT_LOADING) MarkSnapshotAsDirty(index); @@ -424,7 +424,7 @@ void BrowserListener::InsertSnapshot(int index) { node.fav_icon = new WmOverviewFavIcon; node.fav_icon->Init(node.snapshot); - node.fav_icon->SetFavIcon(browser_->GetTabContentsAt(index)->GetFavicon()); + node.fav_icon->SetFavicon(browser_->GetTabContentsAt(index)->GetFavicon()); node.title = new WmOverviewTitle; node.title->Init(gfx::Size(std::max(0, cell_size.width() - diff --git a/chrome/browser/chromeos/wm_overview_fav_icon.cc b/chrome/browser/chromeos/wm_overview_fav_icon.cc index 31fcafb..0b98fe1 100644 --- a/chrome/browser/chromeos/wm_overview_fav_icon.cc +++ b/chrome/browser/chromeos/wm_overview_fav_icon.cc @@ -51,7 +51,7 @@ void WmOverviewFavIcon::Init(WmOverviewSnapshot* snapshot) { } -void WmOverviewFavIcon::SetFavIcon(const SkBitmap& image) { +void WmOverviewFavIcon::SetFavicon(const SkBitmap& image) { CHECK(fav_icon_view_) << "Init not called before setting favicon."; SkBitmap icon; if (image.width() && image.height()) { diff --git a/chrome/browser/chromeos/wm_overview_fav_icon.h b/chrome/browser/chromeos/wm_overview_fav_icon.h index 40f75b7..9edbe099 100644 --- a/chrome/browser/chromeos/wm_overview_fav_icon.h +++ b/chrome/browser/chromeos/wm_overview_fav_icon.h @@ -30,7 +30,7 @@ class WmOverviewFavIcon : public views::WidgetGtk { // Setting the favicon sets the bounds to the size of the given // image. - void SetFavIcon(const SkBitmap& image); + void SetFavicon(const SkBitmap& image); private: // This control is the contents view for this widget. diff --git a/chrome/browser/favicon_helper.h b/chrome/browser/favicon_helper.h index 38b20b4..6ac559c 100644 --- a/chrome/browser/favicon_helper.h +++ b/chrome/browser/favicon_helper.h @@ -36,7 +36,7 @@ class TabContents; // first depends upon who is faster): notification from the history // db on our request for the favicon (OnFaviconDataForInitialURL), // or a message from the renderer giving us the URL of the favicon for -// the page (SetFavIconURL). +// the page (SetFaviconURL). // . If the history db has a valid up to date favicon for the page, we update // the NavigationEntry and use the favicon. // . When we receive the favicon url if it matches that of the NavigationEntry @@ -61,7 +61,7 @@ class TabContents; // db knew about the favicon), or requests the renderer to download the // favicon. // -// When the renderer downloads the favicon SetFavIconImageData is invoked, +// When the renderer downloads the favicon SetFaviconImageData is invoked, // at which point we update the favicon of the NavigationEntry and notify // the database to save the favicon. diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc index c0d7f12..1b3a6e0 100644 --- a/chrome/browser/history/history.cc +++ b/chrome/browser/history/history.cc @@ -475,7 +475,7 @@ void HistoryService::SetFavicon(const GURL& page_url, if (!CanAddURL(page_url)) return; - ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::SetFavIcon, + ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::SetFavicon, page_url, icon_url, scoped_refptr<RefCountedMemory>(new RefCountedBytes(image_data)), history::FAV_ICON); @@ -483,7 +483,7 @@ void HistoryService::SetFavicon(const GURL& page_url, void HistoryService::SetFaviconOutOfDateForPage(const GURL& page_url) { ScheduleAndForget(PRIORITY_NORMAL, - &HistoryBackend::SetFavIconOutOfDateForPage, page_url); + &HistoryBackend::SetFaviconOutOfDateForPage, page_url); } void HistoryService::SetImportedFavicons( diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc index 5951ef6..716cb34 100644 --- a/chrome/browser/history/history_backend.cc +++ b/chrome/browser/history/history_backend.cc @@ -1614,7 +1614,7 @@ void HistoryBackend::UpdateFavIconMappingAndFetch( UpdateFavIconMappingAndFetchImpl(&page_url, icon_url, request, icon_type); } -void HistoryBackend::SetFavIconOutOfDateForPage(const GURL& page_url) { +void HistoryBackend::SetFaviconOutOfDateForPage(const GURL& page_url) { std::vector<IconMapping> icon_mappings; if (!thumbnail_db_.get() || @@ -1624,7 +1624,7 @@ void HistoryBackend::SetFavIconOutOfDateForPage(const GURL& page_url) { for (std::vector<IconMapping>::iterator m = icon_mappings.begin(); m != icon_mappings.end(); ++m) { - thumbnail_db_->SetFavIconLastUpdateTime(m->icon_id, Time()); + thumbnail_db_->SetFaviconLastUpdateTime(m->icon_id, Time()); } ScheduleCommit(); } @@ -1648,7 +1648,7 @@ void HistoryBackend::SetImportedFavicons( history::FAV_ICON); if (!favicon_id) continue; // Unable to add the favicon. - thumbnail_db_->SetFavIcon(favicon_id, + thumbnail_db_->SetFavicon(favicon_id, new RefCountedBytes(favicon_usage[i].png_data), now); } @@ -1724,10 +1724,10 @@ void HistoryBackend::UpdateFavIconMappingAndFetchImpl( } if (page_url) - SetFavIconMapping(*page_url, favicon_id, returned_icon_type); + SetFaviconMapping(*page_url, favicon_id, returned_icon_type); } // else case, haven't cached entry yet. Caller is responsible for - // downloading the favicon and invoking SetFavIcon. + // downloading the favicon and invoking SetFavicon. } request->ForwardResult(GetFavIconRequest::TupleType( request->handle(), know_favicon, data, expired, @@ -1772,7 +1772,7 @@ void HistoryBackend::GetFavIconForURL( expired, icon_url)); } -void HistoryBackend::SetFavIcon( +void HistoryBackend::SetFavicon( const GURL& page_url, const GURL& icon_url, scoped_refptr<RefCountedMemory> data, @@ -1787,12 +1787,12 @@ void HistoryBackend::SetFavIcon( id = thumbnail_db_->AddFavIcon(icon_url, icon_type); // Set the image data. - thumbnail_db_->SetFavIcon(id, data, Time::Now()); + thumbnail_db_->SetFavicon(id, data, Time::Now()); - SetFavIconMapping(page_url, id, icon_type); + SetFaviconMapping(page_url, id, icon_type); } -void HistoryBackend::SetFavIconMapping(const GURL& page_url, +void HistoryBackend::SetFaviconMapping(const GURL& page_url, FavIconID id, IconType icon_type) { if (!thumbnail_db_.get()) diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h index 3d9dd80..21ec989 100644 --- a/chrome/browser/history/history_backend.h +++ b/chrome/browser/history/history_backend.h @@ -217,7 +217,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, const GURL& page_url, int icon_types); - void SetFavIcon(const GURL& page_url, + void SetFavicon(const GURL& page_url, const GURL& icon_url, scoped_refptr<RefCountedMemory> data, IconType icon_type); @@ -227,7 +227,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, const GURL& icon_url, IconType icon_type); - void SetFavIconOutOfDateForPage(const GURL& page_url); + void SetFaviconOutOfDateForPage(const GURL& page_url); void SetImportedFavicons( const std::vector<ImportedFavIconUsage>& favicon_usage); @@ -342,7 +342,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, RemoveVisitsSource); FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MigrationVisitSource); FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, MigrationIconMapping); - FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetFavIconMapping); + FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, SetFaviconMapping); FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, AddOrUpdateIconMapping); friend class ::TestingProfile; @@ -444,7 +444,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, // Favicons ------------------------------------------------------------------ // Used by both UpdateFavIconMappingAndFetch and GetFavicon. - // If page_url is non-null and SetFavIcon has previously been invoked for + // If page_url is non-null and SetFavicon has previously been invoked for // icon_url the favicon url for page_url (and all redirects) is set to // icon_url. // Only a single type can be given in icon_type when page_url is specified. @@ -456,7 +456,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, // Sets the favicon url id for page_url to id. This will also broadcast // notifications as necessary. - void SetFavIconMapping(const GURL& page_url, + void SetFaviconMapping(const GURL& page_url, FavIconID id, IconType icon_type); diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc index 3e0ac18..ad1c869 100644 --- a/chrome/browser/history/history_backend_unittest.cc +++ b/chrome/browser/history/history_backend_unittest.cc @@ -223,11 +223,11 @@ TEST_F(HistoryBackendTest, DeleteAll) { std::vector<unsigned char> data; data.push_back('1'); - EXPECT_TRUE(backend_->thumbnail_db_->SetFavIcon(favicon1, + EXPECT_TRUE(backend_->thumbnail_db_->SetFavicon(favicon1, new RefCountedBytes(data), Time::Now())); data[0] = '2'; - EXPECT_TRUE(backend_->thumbnail_db_->SetFavIcon( + EXPECT_TRUE(backend_->thumbnail_db_->SetFavicon( favicon2, new RefCountedBytes(data), Time::Now())); // First visit two URLs. @@ -356,11 +356,11 @@ TEST_F(HistoryBackendTest, URLsNoLongerBookmarked) { std::vector<unsigned char> data; data.push_back('1'); - EXPECT_TRUE(backend_->thumbnail_db_->SetFavIcon( + EXPECT_TRUE(backend_->thumbnail_db_->SetFavicon( favicon1, new RefCountedBytes(data), Time::Now())); data[0] = '2'; - EXPECT_TRUE(backend_->thumbnail_db_->SetFavIcon( + EXPECT_TRUE(backend_->thumbnail_db_->SetFavicon( favicon2, new RefCountedBytes(data), Time::Now())); // First visit two URLs. @@ -526,7 +526,7 @@ TEST_F(HistoryBackendTest, ImportedFaviconsTest) { FAV_ICON); std::vector<unsigned char> data; data.push_back('1'); - EXPECT_TRUE(backend_->thumbnail_db_->SetFavIcon(favicon1, + EXPECT_TRUE(backend_->thumbnail_db_->SetFavicon(favicon1, RefCountedBytes::TakeVector(&data), Time::Now())); URLRow row1(GURL("http://www.google.com/")); row1.set_visit_count(1); @@ -820,7 +820,7 @@ TEST_F(HistoryBackendTest, MigrationVisitSource) { EXPECT_FALSE(s.Step()); } -TEST_F(HistoryBackendTest, SetFavIconMapping) { +TEST_F(HistoryBackendTest, SetFaviconMapping) { // Init recent_redirects_ const GURL url1("http://www.google.com"); const GURL url2("http://www.google.com/m"); @@ -846,7 +846,7 @@ TEST_F(HistoryBackendTest, SetFavIconMapping) { const GURL icon_url("http://www.google.com/icon"); std::vector<unsigned char> data(blob1, blob1 + sizeof(blob1)); // Add a favicon - backend_->SetFavIcon( + backend_->SetFavicon( url1, icon_url, RefCountedBytes::TakeVector(&data), FAV_ICON); EXPECT_TRUE(backend_->thumbnail_db_->GetIconMappingForPageURL( url1, FAV_ICON, NULL)); @@ -854,7 +854,7 @@ TEST_F(HistoryBackendTest, SetFavIconMapping) { url2, FAV_ICON, NULL)); // Add a touch_icon - backend_->SetFavIcon( + backend_->SetFavicon( url1, icon_url, RefCountedBytes::TakeVector(&data), TOUCH_ICON); EXPECT_TRUE(backend_->thumbnail_db_->GetIconMappingForPageURL( url1, TOUCH_ICON, NULL)); @@ -864,7 +864,7 @@ TEST_F(HistoryBackendTest, SetFavIconMapping) { url1, FAV_ICON, NULL)); // Add a TOUCH_PRECOMPOSED_ICON - backend_->SetFavIcon(url1, + backend_->SetFavicon(url1, icon_url, RefCountedBytes::TakeVector(&data), TOUCH_PRECOMPOSED_ICON); @@ -879,7 +879,7 @@ TEST_F(HistoryBackendTest, SetFavIconMapping) { url2, TOUCH_PRECOMPOSED_ICON, NULL)); // Add a touch_icon - backend_->SetFavIcon( + backend_->SetFavicon( url1, icon_url, RefCountedBytes::TakeVector(&data), TOUCH_ICON); EXPECT_TRUE(backend_->thumbnail_db_->GetIconMappingForPageURL( url1, TOUCH_ICON, NULL)); @@ -891,7 +891,7 @@ TEST_F(HistoryBackendTest, SetFavIconMapping) { // Add a fav_icon const GURL icon_url2("http://www.google.com/icon2"); - backend_->SetFavIcon( + backend_->SetFavicon( url1, icon_url2, RefCountedBytes::TakeVector(&data), FAV_ICON); FavIconID icon_id = backend_->thumbnail_db_->GetFavIconIDForFavIconURL( icon_url2, FAV_ICON, NULL); @@ -906,12 +906,12 @@ TEST_F(HistoryBackendTest, SetFavIconMapping) { TEST_F(HistoryBackendTest, AddOrUpdateIconMapping) { // Test the same icon and page mapping will not be added twice. other case - // should be covered in TEST_F(HistoryBackendTest, SetFavIconMapping) + // should be covered in TEST_F(HistoryBackendTest, SetFaviconMapping) const GURL url("http://www.google.com/"); const GURL icon_url("http://www.google.com/icon"); std::vector<unsigned char> data(blob1, blob1 + sizeof(blob1)); - backend_->SetFavIcon( + backend_->SetFavicon( url, icon_url, RefCountedBytes::TakeVector(&data), FAV_ICON); FavIconID icon_id = backend_->thumbnail_db_->GetFavIconIDForFavIconURL( icon_url, FAV_ICON, NULL); diff --git a/chrome/browser/history/page_usage_data.cc b/chrome/browser/history/page_usage_data.cc index 8fc2d8b..adfd8d9 100644 --- a/chrome/browser/history/page_usage_data.cc +++ b/chrome/browser/history/page_usage_data.cc @@ -32,7 +32,7 @@ void PageUsageData::SetThumbnail(SkBitmap* img) { thumbnail_set_ = true; } -void PageUsageData::SetFavIcon(SkBitmap* img) { +void PageUsageData::SetFavicon(SkBitmap* img) { if (favicon_ && favicon_ != img) delete favicon_; favicon_ = img; diff --git a/chrome/browser/history/page_usage_data.h b/chrome/browser/history/page_usage_data.h index 3c6c3c7..dece788 100644 --- a/chrome/browser/history/page_usage_data.h +++ b/chrome/browser/history/page_usage_data.h @@ -79,11 +79,11 @@ class PageUsageData { thumbnail_pending_ = pending; } - void SetFavIconMissing() { + void SetFaviconMissing() { favicon_set_ = true; } - void SetFavIcon(SkBitmap* img); + void SetFavicon(SkBitmap* img); bool HasFavIcon() const { return favicon_set_; diff --git a/chrome/browser/history/thumbnail_database.cc b/chrome/browser/history/thumbnail_database.cc index edb9ca9..2ec82ed 100644 --- a/chrome/browser/history/thumbnail_database.cc +++ b/chrome/browser/history/thumbnail_database.cc @@ -360,7 +360,7 @@ bool ThumbnailDatabase::ThumbnailScoreForId(URLID id, return false; } -bool ThumbnailDatabase::SetFavIcon(URLID icon_id, +bool ThumbnailDatabase::SetFavicon(URLID icon_id, scoped_refptr<RefCountedMemory> icon_data, base::Time time) { DCHECK(icon_id); @@ -387,7 +387,7 @@ bool ThumbnailDatabase::SetFavIcon(URLID icon_id, } } -bool ThumbnailDatabase::SetFavIconLastUpdateTime(FavIconID icon_id, +bool ThumbnailDatabase::SetFaviconLastUpdateTime(FavIconID icon_id, base::Time time) { sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE, "UPDATE favicons SET last_updated=? WHERE id=?")); diff --git a/chrome/browser/history/thumbnail_database.h b/chrome/browser/history/thumbnail_database.h index 210d97f..2842b34 100644 --- a/chrome/browser/history/thumbnail_database.h +++ b/chrome/browser/history/thumbnail_database.h @@ -98,12 +98,12 @@ class ThumbnailDatabase { // Sets the bits for a favicon. This should be png encoded data. // The time indicates the access time, and is used to detect when the favicon // should be refreshed. - bool SetFavIcon(FavIconID icon_id, + bool SetFavicon(FavIconID icon_id, scoped_refptr<RefCountedMemory> icon_data, base::Time time); // Sets the time the favicon was last updated. - bool SetFavIconLastUpdateTime(FavIconID icon_id, base::Time time); + bool SetFaviconLastUpdateTime(FavIconID icon_id, base::Time time); // Returns the id of the entry in the favicon database with the specified url // and icon type. If |required_icon_type| contains multiple icon types and diff --git a/chrome/browser/history/thumbnail_database_unittest.cc b/chrome/browser/history/thumbnail_database_unittest.cc index 910b5a6..ecce8d2 100644 --- a/chrome/browser/history/thumbnail_database_unittest.cc +++ b/chrome/browser/history/thumbnail_database_unittest.cc @@ -121,7 +121,7 @@ TEST_F(ThumbnailDatabaseTest, GetFaviconAfterMigrationToTopSites) { GURL url("http://google.com"); FavIconID id = db.AddFavIcon(url, FAV_ICON); base::Time time = base::Time::Now(); - db.SetFavIcon(id, favicon, time); + db.SetFavicon(id, favicon, time); EXPECT_TRUE(db.RenameAndDropThumbnails(file_name_, new_file_name_)); base::Time time_out; @@ -148,7 +148,7 @@ TEST_F(ThumbnailDatabaseTest, AddIconMapping) { FavIconID id = db.AddFavIcon(url, TOUCH_ICON); EXPECT_NE(0, id); base::Time time = base::Time::Now(); - db.SetFavIcon(id, favicon, time); + db.SetFavicon(id, favicon, time); EXPECT_NE(0, db.AddIconMapping(url, id)); std::vector<IconMapping> icon_mapping; @@ -169,7 +169,7 @@ TEST_F(ThumbnailDatabaseTest, UpdateIconMapping) { GURL url("http://google.com"); FavIconID id = db.AddFavIcon(url, TOUCH_ICON); base::Time time = base::Time::Now(); - db.SetFavIcon(id, favicon, time); + db.SetFavicon(id, favicon, time); EXPECT_TRUE(0 < db.AddIconMapping(url, id)); std::vector<IconMapping> icon_mapping; @@ -201,11 +201,11 @@ TEST_F(ThumbnailDatabaseTest, DeleteIconMappings) { GURL url("http://google.com"); FavIconID id = db.AddFavIcon(url, TOUCH_ICON); base::Time time = base::Time::Now(); - db.SetFavIcon(id, favicon, time); + db.SetFavicon(id, favicon, time); EXPECT_TRUE(0 < db.AddIconMapping(url, id)); FavIconID id2 = db.AddFavIcon(url, FAV_ICON); - db.SetFavIcon(id2, favicon, time); + db.SetFavicon(id2, favicon, time); EXPECT_TRUE(0 < db.AddIconMapping(url, id2)); ASSERT_NE(id, id2); @@ -233,12 +233,12 @@ TEST_F(ThumbnailDatabaseTest, GetIconMappingsForPageURL) { FavIconID id1 = db.AddFavIcon(url, TOUCH_ICON); base::Time time = base::Time::Now(); - db.SetFavIcon(id1, favicon, time); + db.SetFavicon(id1, favicon, time); EXPECT_TRUE(0 < db.AddIconMapping(url, id1)); FavIconID id2 = db.AddFavIcon(url, FAV_ICON); EXPECT_NE(id1, id2); - db.SetFavIcon(id2, favicon, time); + db.SetFavicon(id2, favicon, time); EXPECT_TRUE(0 < db.AddIconMapping(url, id2)); std::vector<IconMapping> icon_mapping; @@ -277,7 +277,7 @@ TEST_F(ThumbnailDatabaseTest, UpgradeToVersion4) { GURL url("http://google.com"); FavIconID id = db.AddFavIcon(url, TOUCH_ICON); base::Time time = base::Time::Now(); - db.SetFavIcon(id, favicon, time); + db.SetFavicon(id, favicon, time); EXPECT_TRUE(0 < db.AddIconMapping(url, id)); IconMapping icon_mapping; @@ -301,7 +301,7 @@ TEST_F(ThumbnailDatabaseTest, TemporayIconMapping) { GURL url("http://google.com"); FavIconID id = db.AddFavIcon(url, FAV_ICON); base::Time time = base::Time::Now(); - db.SetFavIcon(id, favicon, time); + db.SetFavicon(id, favicon, time); db.AddToTemporaryIconMappingTable(url, id); db.CommitTemporaryIconMappingTable(); @@ -323,7 +323,7 @@ TEST_F(ThumbnailDatabaseTest, GetIconMappingsForPageURLForReturnOrder) { GURL url("http://google.com"); FavIconID id = db.AddFavIcon(url, FAV_ICON); base::Time time = base::Time::Now(); - db.SetFavIcon(id, favicon, time); + db.SetFavicon(id, favicon, time); EXPECT_NE(0, db.AddIconMapping(url, id)); std::vector<IconMapping> icon_mapping; @@ -338,7 +338,7 @@ TEST_F(ThumbnailDatabaseTest, GetIconMappingsForPageURLForReturnOrder) { scoped_refptr<RefCountedBytes> favicon2(new RefCountedBytes(data)); FavIconID id2 = db.AddFavIcon(url, TOUCH_ICON); - db.SetFavIcon(id2, favicon2, time); + db.SetFavicon(id2, favicon2, time); EXPECT_NE(0, db.AddIconMapping(url, id2)); icon_mapping.clear(); @@ -352,7 +352,7 @@ TEST_F(ThumbnailDatabaseTest, GetIconMappingsForPageURLForReturnOrder) { scoped_refptr<RefCountedBytes> favicon3(new RefCountedBytes(data2)); FavIconID id3 = db.AddFavIcon(url, TOUCH_PRECOMPOSED_ICON); - db.SetFavIcon(id3, favicon3, time); + db.SetFavicon(id3, favicon3, time); EXPECT_NE(0, db.AddIconMapping(url, id3)); icon_mapping.clear(); @@ -375,19 +375,19 @@ TEST_F(ThumbnailDatabaseTest, HasMappingFor) { FavIconID id1 = db.AddFavIcon(GURL("http://google.com"), FAV_ICON); EXPECT_NE(id1, 0); base::Time time = base::Time::Now(); - db.SetFavIcon(id1, favicon, time); + db.SetFavicon(id1, favicon, time); // Add another type of favicon FavIconID id2 = db.AddFavIcon(GURL("http://www.google.com/icon"), TOUCH_ICON); EXPECT_NE(id2, 0); time = base::Time::Now(); - db.SetFavIcon(id2, favicon, time); + db.SetFavicon(id2, favicon, time); // Add 3rd favicon FavIconID id3 = db.AddFavIcon(GURL("http://www.google.com/icon"), TOUCH_ICON); EXPECT_NE(id3, 0); time = base::Time::Now(); - db.SetFavIcon(id3, favicon, time); + db.SetFavicon(id3, favicon, time); // Add 2 icon mapping GURL page_url("http://www.google.com"); diff --git a/chrome/browser/importer/external_process_importer_client.cc b/chrome/browser/importer/external_process_importer_client.cc index 36de7ad..59a785a 100644 --- a/chrome/browser/importer/external_process_importer_client.cc +++ b/chrome/browser/importer/external_process_importer_client.cc @@ -208,7 +208,7 @@ void ExternalProcessImporterClient::OnFavIconsImportGroup( 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_); + bridge_->SetFavicons(fav_icons_); } void ExternalProcessImporterClient::OnPasswordFormImportReady( diff --git a/chrome/browser/importer/firefox2_importer.cc b/chrome/browser/importer/firefox2_importer.cc index d0208f2..d180ea1 100644 --- a/chrome/browser/importer/firefox2_importer.cc +++ b/chrome/browser/importer/firefox2_importer.cc @@ -318,7 +318,7 @@ void Firefox2Importer::ImportBookmarks() { STLDeleteContainerPointers(template_urls.begin(), template_urls.end()); } if (!favicons.empty()) { - bridge_->SetFavIcons(favicons); + bridge_->SetFavicons(favicons); } } diff --git a/chrome/browser/importer/firefox3_importer.cc b/chrome/browser/importer/firefox3_importer.cc index 7017eab..8c5b656 100644 --- a/chrome/browser/importer/firefox3_importer.cc +++ b/chrome/browser/importer/firefox3_importer.cc @@ -301,7 +301,7 @@ void Firefox3Importer::ImportBookmarks() { if (!favicon_map.empty() && !cancelled()) { std::vector<history::ImportedFavIconUsage> favicons; LoadFavicons(db.get(), favicon_map, &favicons); - bridge_->SetFavIcons(favicons); + bridge_->SetFavicons(favicons); } } diff --git a/chrome/browser/importer/importer_bridge.cc b/chrome/browser/importer/importer_bridge.cc index 692029d..c7afd1a 100644 --- a/chrome/browser/importer/importer_bridge.cc +++ b/chrome/browser/importer/importer_bridge.cc @@ -57,7 +57,7 @@ void InProcessImporterBridge::AddIE7PasswordInfo( } #endif // OS_WIN -void InProcessImporterBridge::SetFavIcons( +void InProcessImporterBridge::SetFavicons( const std::vector<history::ImportedFavIconUsage>& fav_icons) { BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, @@ -151,7 +151,7 @@ void ExternalProcessImporterBridge::AddIE7PasswordInfo( } #endif -void ExternalProcessImporterBridge::SetFavIcons( +void ExternalProcessImporterBridge::SetFavicons( const std::vector<history::ImportedFavIconUsage>& fav_icons) { profile_import_thread_->NotifyFavIconsImportReady(fav_icons); } diff --git a/chrome/browser/importer/importer_bridge.h b/chrome/browser/importer/importer_bridge.h index 804d70b..335dcc9 100644 --- a/chrome/browser/importer/importer_bridge.h +++ b/chrome/browser/importer/importer_bridge.h @@ -33,7 +33,7 @@ class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> { virtual void AddIE7PasswordInfo(const IE7PasswordInfo password_info) = 0; #endif - virtual void SetFavIcons( + virtual void SetFavicons( const std::vector<history::ImportedFavIconUsage>& fav_icons) = 0; virtual void SetHistoryItems(const std::vector<history::URLRow> &rows, history::VisitSource visit_source) = 0; @@ -91,7 +91,7 @@ class InProcessImporterBridge : public ImporterBridge { virtual void AddIE7PasswordInfo(const IE7PasswordInfo password_info); #endif - virtual void SetFavIcons( + virtual void SetFavicons( const std::vector<history::ImportedFavIconUsage>& fav_icons); virtual void SetHistoryItems(const std::vector<history::URLRow> &rows, history::VisitSource visit_source); @@ -137,7 +137,7 @@ class ExternalProcessImporterBridge : public ImporterBridge { virtual void AddIE7PasswordInfo(const IE7PasswordInfo password_info); #endif - virtual void SetFavIcons( + virtual void SetFavicons( const std::vector<history::ImportedFavIconUsage>& fav_icons); virtual void SetHistoryItems(const std::vector<history::URLRow> &rows, history::VisitSource visit_source); diff --git a/chrome/browser/importer/safari_importer.mm b/chrome/browser/importer/safari_importer.mm index e1046c6..fa5135f 100644 --- a/chrome/browser/importer/safari_importer.mm +++ b/chrome/browser/importer/safari_importer.mm @@ -120,7 +120,7 @@ void SafariImporter::ImportBookmarks() { if (!favicon_map.empty() && !cancelled()) { std::vector<history::ImportedFavIconUsage> favicons; LoadFaviconData(db.get(), favicon_map, &favicons); - bridge_->SetFavIcons(favicons); + bridge_->SetFavicons(favicons); } } diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc index ccdd594..5172c67 100644 --- a/chrome/browser/search_engines/template_url.cc +++ b/chrome/browser/search_engines/template_url.cc @@ -650,7 +650,7 @@ bool TemplateURL::ShowInDefaultList() const { return show_in_default_list() && url() && url()->SupportsReplacement(); } -void TemplateURL::SetFavIconURL(const GURL& url) { +void TemplateURL::SetFaviconURL(const GURL& url) { for (std::vector<ImageRef>::iterator i = image_refs_.begin(); i != image_refs_.end(); ++i) { if (i->type == "image/x-icon" && diff --git a/chrome/browser/search_engines/template_url.h b/chrome/browser/search_engines/template_url.h index 0947d3f..27ea785 100644 --- a/chrome/browser/search_engines/template_url.h +++ b/chrome/browser/search_engines/template_url.h @@ -409,7 +409,7 @@ class TemplateURL { // a situation GetFavIconURL returns an invalid url. // // If url is empty and there is an image ref for a favicon, it is removed. - void SetFavIconURL(const GURL& url); + void SetFaviconURL(const GURL& url); GURL GetFavIconURL() const; // Set of languages supported. This may be empty. diff --git a/chrome/browser/search_engines/template_url_fetcher.cc b/chrome/browser/search_engines/template_url_fetcher.cc index 42ab957..586d4d0 100644 --- a/chrome/browser/search_engines/template_url_fetcher.cc +++ b/chrome/browser/search_engines/template_url_fetcher.cc @@ -228,7 +228,7 @@ void TemplateURLFetcher::RequestDelegate::AddSearchProvider() { // The page may have specified a URL to use for favicons, if not, set it. if (!template_url_->GetFavIconURL().is_valid()) - template_url_->SetFavIconURL(favicon_url_); + template_url_->SetFaviconURL(favicon_url_); switch (provider_type_) { case AUTODETECTED_PROVIDER: diff --git a/chrome/browser/search_engines/template_url_model.cc b/chrome/browser/search_engines/template_url_model.cc index 9a6a445..edaea49 100644 --- a/chrome/browser/search_engines/template_url_model.cc +++ b/chrome/browser/search_engines/template_url_model.cc @@ -392,7 +392,7 @@ void TemplateURLModel::ResetTemplateURL(const TemplateURL* url, (!new_url.url() && !search_url.empty()) || (new_url.url() && new_url.url()->url() != search_url)) { // The urls have changed, reset the favicon url. - new_url.SetFavIconURL(GURL()); + new_url.SetFaviconURL(GURL()); new_url.SetURL(search_url, 0, 0); } new_url.set_safe_for_autoreplace(false); @@ -850,7 +850,7 @@ bool TemplateURLModel::LoadDefaultSearchProviderFromPrefs( (*default_provider)->SetSuggestionsURL(suggest_url, 0, 0); (*default_provider)->SetInstantURL(instant_url, 0, 0); (*default_provider)->set_keyword(keyword); - (*default_provider)->SetFavIconURL(GURL(icon_url)); + (*default_provider)->SetFaviconURL(GURL(icon_url)); std::vector<std::string> encodings_vector; base::SplitString(encodings, ';', &encodings_vector); (*default_provider)->set_input_encodings(encodings_vector); diff --git a/chrome/browser/search_engines/template_url_model_unittest.cc b/chrome/browser/search_engines/template_url_model_unittest.cc index cd901c4..40b0ffc81 100644 --- a/chrome/browser/search_engines/template_url_model_unittest.cc +++ b/chrome/browser/search_engines/template_url_model_unittest.cc @@ -98,7 +98,7 @@ static TemplateURL* CreatePreloadedTemplateURL() { t_url->set_short_name(ASCIIToUTF16("unittest")); t_url->set_safe_for_autoreplace(true); GURL favicon_url("http://favicon.url"); - t_url->SetFavIconURL(favicon_url); + t_url->SetFaviconURL(favicon_url); t_url->set_date_created(Time::FromTimeT(100)); t_url->set_prepopulate_id(999999); return t_url; @@ -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(fav_icon_url)); template_url->set_keyword(UTF8ToUTF16(keyword)); template_url->set_autogenerate_keyword(autogenerate_keyword); template_url->set_short_name(UTF8ToUTF16(short_name)); @@ -392,7 +392,7 @@ TEST_F(TemplateURLModelTest, AddUpdateRemove) { t_url->set_keyword(ASCIIToUTF16("keyword")); t_url->set_short_name(ASCIIToUTF16("google")); GURL favicon_url("http://favicon.url"); - t_url->SetFavIconURL(favicon_url); + t_url->SetFaviconURL(favicon_url); t_url->set_date_created(Time::FromTimeT(100)); t_url->set_safe_for_autoreplace(true); model()->Add(t_url); @@ -558,7 +558,7 @@ TEST_F(TemplateURLModelTest, Reset) { t_url->set_keyword(ASCIIToUTF16("keyword")); t_url->set_short_name(ASCIIToUTF16("google")); GURL favicon_url("http://favicon.url"); - t_url->SetFavIconURL(favicon_url); + t_url->SetFaviconURL(favicon_url); t_url->set_date_created(Time::FromTimeT(100)); model()->Add(t_url); @@ -1132,7 +1132,7 @@ TEST_F(TemplateURLModelTest, TestManagedDefaultSearch) { // Verify that the default manager we are getting is the managed one. scoped_ptr<TemplateURL> expected_managed_default1(new TemplateURL()); expected_managed_default1->SetURL(kSearchURL, 0, 0); - expected_managed_default1->SetFavIconURL(GURL(kIconURL)); + expected_managed_default1->SetFaviconURL(GURL(kIconURL)); expected_managed_default1->set_short_name(ASCIIToUTF16("test1")); std::vector<std::string> encodings_vector; base::SplitString(kEncodings, ';', &encodings_vector); diff --git a/chrome/browser/search_engines/template_url_parser.cc b/chrome/browser/search_engines/template_url_parser.cc index e691d44..f5dd0b7 100644 --- a/chrome/browser/search_engines/template_url_parser.cc +++ b/chrome/browser/search_engines/template_url_parser.cc @@ -202,7 +202,7 @@ class ParsingContext { if (derive_image_from_url_ && url_->GetFavIconURL().is_empty() && url_->url()) { GURL url(url_->url()->url()); // More url's please... - url_->SetFavIconURL(TemplateURL::GenerateFaviconURL(url)); + url_->SetFaviconURL(TemplateURL::GenerateFaviconURL(url)); } } diff --git a/chrome/browser/search_engines/template_url_prepopulate_data.cc b/chrome/browser/search_engines/template_url_prepopulate_data.cc index 6cb64bd..341468c 100644 --- a/chrome/browser/search_engines/template_url_prepopulate_data.cc +++ b/chrome/browser/search_engines/template_url_prepopulate_data.cc @@ -3374,7 +3374,7 @@ TemplateURL* MakePrepopulatedTemplateURL(const wchar_t* name, TemplateURL* new_turl = new TemplateURL(); new_turl->SetURL(WideToUTF8(search_url), 0, 0); if (favicon_url) - new_turl->SetFavIconURL(GURL(favicon_url)); + new_turl->SetFaviconURL(GURL(favicon_url)); if (suggest_url) new_turl->SetSuggestionsURL(WideToUTF8(suggest_url), 0, 0); if (instant_url) diff --git a/chrome/browser/search_engines/template_url_unittest.cc b/chrome/browser/search_engines/template_url_unittest.cc index 819164c..80018bc 100644 --- a/chrome/browser/search_engines/template_url_unittest.cc +++ b/chrome/browser/search_engines/template_url_unittest.cc @@ -243,15 +243,15 @@ TEST_F(TemplateURLTest, URLRefTermToWide) { } } -TEST_F(TemplateURLTest, SetFavIcon) { +TEST_F(TemplateURLTest, SetFavicon) { TemplateURL url; GURL favicon_url("http://favicon.url"); - url.SetFavIconURL(favicon_url); + url.SetFaviconURL(favicon_url); ASSERT_EQ(1U, url.image_refs().size()); ASSERT_TRUE(favicon_url == url.GetFavIconURL()); GURL favicon_url2("http://favicon2.url"); - url.SetFavIconURL(favicon_url2); + url.SetFaviconURL(favicon_url2); ASSERT_EQ(1U, url.image_refs().size()); ASSERT_TRUE(favicon_url2 == url.GetFavIconURL()); } diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc index c90984c..382fe01 100644 --- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc +++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc @@ -222,11 +222,11 @@ class TabRendererGtk::FavIconCrashAnimation : public ui::LinearAnimation, const double kHidingOffset = 27; if (state < .5) { - target_->SetFavIconHidingOffset( + target_->SetFaviconHidingOffset( static_cast<int>(floor(kHidingOffset * 2.0 * state))); } else { target_->DisplayCrashedFavIcon(); - target_->SetFavIconHidingOffset( + target_->SetFaviconHidingOffset( static_cast<int>( floor(kHidingOffset - ((state - .5) * 2.0 * kHidingOffset)))); } @@ -234,7 +234,7 @@ class TabRendererGtk::FavIconCrashAnimation : public ui::LinearAnimation, // ui::AnimationDelegate overrides: virtual void AnimationCanceled(const ui::Animation* animation) { - target_->SetFavIconHidingOffset(0); + target_->SetFaviconHidingOffset(0); } private: @@ -604,7 +604,7 @@ bool TabRendererGtk::IsPerformingCrashAnimation() const { return crash_animation_.get() && crash_animation_->is_animating(); } -void TabRendererGtk::SetFavIconHidingOffset(int offset) { +void TabRendererGtk::SetFaviconHidingOffset(int offset) { fav_icon_hiding_offset_ = offset; SchedulePaint(); } diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h index 2100ea1..54e8f65 100644 --- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h +++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h @@ -304,7 +304,7 @@ class TabRendererGtk : public ui::AnimationDelegate, bool IsPerformingCrashAnimation() const; // Set the temporary offset for the favicon. This is used during animation. - void SetFavIconHidingOffset(int offset); + void SetFaviconHidingOffset(int offset); void DisplayCrashedFavIcon(); void ResetCrashedFavIcon(); diff --git a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc index 0e2f46b..e23d793 100644 --- a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc +++ b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc @@ -186,14 +186,14 @@ void SearchEngineTabHelper::GenerateKeywordIfNecessary( const GURL& favicon_url = controller.GetLastCommittedEntry()->favicon().url(); if (favicon_url.is_valid()) { - new_url->SetFavIconURL(favicon_url); + new_url->SetFaviconURL(favicon_url); } else { // The favicon url isn't valid. This means there really isn't a favicon, // or the favicon url wasn't obtained before the load started. This assumes // the later. // TODO(sky): Need a way to set the favicon that doesn't involve generating // its url. - new_url->SetFavIconURL(TemplateURL::GenerateFaviconURL(params.referrer)); + new_url->SetFaviconURL(TemplateURL::GenerateFaviconURL(params.referrer)); } new_url->set_safe_for_autoreplace(true); url_model->Add(new_url); diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc index 91ed700..645a60b 100644 --- a/chrome/browser/ui/views/tabs/base_tab.cc +++ b/chrome/browser/ui/views/tabs/base_tab.cc @@ -119,11 +119,11 @@ class BaseTab::FavIconCrashAnimation : public ui::LinearAnimation, const double kHidingOffset = 27; if (state < .5) { - target_->SetFavIconHidingOffset( + target_->SetFaviconHidingOffset( static_cast<int>(floor(kHidingOffset * 2.0 * state))); } else { target_->DisplayCrashedFavIcon(); - target_->SetFavIconHidingOffset( + target_->SetFaviconHidingOffset( static_cast<int>( floor(kHidingOffset - ((state - .5) * 2.0 * kHidingOffset)))); } @@ -131,7 +131,7 @@ class BaseTab::FavIconCrashAnimation : public ui::LinearAnimation, // ui::AnimationDelegate overrides: virtual void AnimationCanceled(const ui::Animation* animation) { - target_->SetFavIconHidingOffset(0); + target_->SetFaviconHidingOffset(0); } private: @@ -518,7 +518,7 @@ int BaseTab::fav_icon_hiding_offset() const { return fav_icon_hiding_offset_; } -void BaseTab::SetFavIconHidingOffset(int offset) { +void BaseTab::SetFaviconHidingOffset(int offset) { fav_icon_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 9ed52d2..5d5b691 100644 --- a/chrome/browser/ui/views/tabs/base_tab.h +++ b/chrome/browser/ui/views/tabs/base_tab.h @@ -150,7 +150,7 @@ class BaseTab : public ui::AnimationDelegate, // Set the temporary offset for the favicon. This is used during the crash // animation. - void SetFavIconHidingOffset(int offset); + void SetFaviconHidingOffset(int offset); void DisplayCrashedFavIcon(); void ResetCrashedFavIcon(); diff --git a/chrome/browser/webdata/web_database.cc b/chrome/browser/webdata/web_database.cc index 9d11629..5957444 100644 --- a/chrome/browser/webdata/web_database.cc +++ b/chrome/browser/webdata/web_database.cc @@ -1116,7 +1116,7 @@ bool WebDatabase::GetKeywords(std::vector<TemplateURL*>* urls) { tmp = s.ColumnString(3); if (!tmp.empty()) - template_url->SetFavIconURL(GURL(tmp)); + template_url->SetFaviconURL(GURL(tmp)); template_url->SetURL(s.ColumnString(4), 0, 0); diff --git a/chrome/browser/webdata/web_database_unittest.cc b/chrome/browser/webdata/web_database_unittest.cc index c37f75c..5842fed 100644 --- a/chrome/browser/webdata/web_database_unittest.cc +++ b/chrome/browser/webdata/web_database_unittest.cc @@ -323,7 +323,7 @@ TEST_F(WebDatabaseTest, Keywords) { template_url.set_keyword(ASCIIToUTF16("keyword")); GURL favicon_url("http://favicon.url/"); GURL originating_url("http://google.com/"); - template_url.SetFavIconURL(favicon_url); + template_url.SetFaviconURL(favicon_url); template_url.SetURL("http://url/", 0, 0); template_url.set_safe_for_autoreplace(true); base::Time created_time = Time::Now(); @@ -416,7 +416,7 @@ TEST_F(WebDatabaseTest, UpdateKeyword) { template_url.set_keyword(ASCIIToUTF16("keyword")); GURL favicon_url("http://favicon.url/"); GURL originating_url("http://originating.url/"); - template_url.SetFavIconURL(favicon_url); + template_url.SetFaviconURL(favicon_url); template_url.SetURL("http://url/", 0, 0); template_url.set_safe_for_autoreplace(true); template_url.set_show_in_default_list(true); |