diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 17:58:58 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 17:58:58 +0000 |
commit | b4dc12ebb9cff9afcab799d94d57d153d793bc19 (patch) | |
tree | fad4caebcd4d02b32b55c87a46fe9867c176d6af /chrome/browser/history | |
parent | 26f9e71c23a1ef0b4716ef3e4e0747992dd7911f (diff) | |
download | chromium_src-b4dc12ebb9cff9afcab799d94d57d153d793bc19.zip chromium_src-b4dc12ebb9cff9afcab799d94d57d153d793bc19.tar.gz chromium_src-b4dc12ebb9cff9afcab799d94d57d153d793bc19.tar.bz2 |
fav icon -> favicon. Pass 6: GetFavIcon* -> GetFavicon*
BUG=76073
TEST=none; no visible change
Review URL: http://codereview.chromium.org/6694027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78233 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history')
-rw-r--r-- | chrome/browser/history/history.cc | 2 | ||||
-rw-r--r-- | chrome/browser/history/history_backend.cc | 22 | ||||
-rw-r--r-- | chrome/browser/history/history_backend.h | 8 | ||||
-rw-r--r-- | chrome/browser/history/history_backend_unittest.cc | 14 | ||||
-rw-r--r-- | chrome/browser/history/history_marshaling.h | 2 | ||||
-rw-r--r-- | chrome/browser/history/thumbnail_database.cc | 2 | ||||
-rw-r--r-- | chrome/browser/history/thumbnail_database.h | 2 |
7 files changed, 26 insertions, 26 deletions
diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc index 8fe2968..4fac854 100644 --- a/chrome/browser/history/history.cc +++ b/chrome/browser/history/history.cc @@ -465,7 +465,7 @@ void HistoryService::UpdateFaviconMappingAndFetch( void HistoryService::GetFaviconForURL( FaviconService::GetFaviconRequest* request, const GURL& page_url) { - Schedule(PRIORITY_NORMAL, &HistoryBackend::GetFavIconForURL, NULL, request, + Schedule(PRIORITY_NORMAL, &HistoryBackend::GetFaviconForURL, NULL, request, page_url, history::FAVICON); } diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc index 2d64f60..4beb4c9 100644 --- a/chrome/browser/history/history_backend.cc +++ b/chrome/browser/history/history_backend.cc @@ -1600,14 +1600,14 @@ bool HistoryBackend::GetThumbnailFromOlderRedirect( return success; } -void HistoryBackend::GetFavicon(scoped_refptr<GetFavIconRequest> request, +void HistoryBackend::GetFavicon(scoped_refptr<GetFaviconRequest> request, const GURL& icon_url, int icon_types) { UpdateFavIconMappingAndFetchImpl(NULL, icon_url, request, icon_types); } void HistoryBackend::UpdateFavIconMappingAndFetch( - scoped_refptr<GetFavIconRequest> request, + scoped_refptr<GetFaviconRequest> request, const GURL& page_url, const GURL& icon_url, IconType icon_type) { @@ -1640,7 +1640,7 @@ void HistoryBackend::SetImportedFavicons( std::set<GURL> favicons_changed; for (size_t i = 0; i < favicon_usage.size(); i++) { - FavIconID favicon_id = thumbnail_db_->GetFavIconIDForFavIconURL( + FavIconID favicon_id = thumbnail_db_->GetFaviconIDForFaviconURL( 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. @@ -1695,7 +1695,7 @@ void HistoryBackend::SetImportedFavicons( void HistoryBackend::UpdateFavIconMappingAndFetchImpl( const GURL* page_url, const GURL& icon_url, - scoped_refptr<GetFavIconRequest> request, + 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 == FAVICON || @@ -1711,7 +1711,7 @@ void HistoryBackend::UpdateFavIconMappingAndFetchImpl( if (thumbnail_db_.get()) { IconType returned_icon_type; const FavIconID favicon_id = - thumbnail_db_->GetFavIconIDForFavIconURL( + thumbnail_db_->GetFaviconIDForFaviconURL( icon_url, icon_types, &returned_icon_type); if (favicon_id) { data = new RefCountedBytes; @@ -1729,13 +1729,13 @@ void HistoryBackend::UpdateFavIconMappingAndFetchImpl( // else case, haven't cached entry yet. Caller is responsible for // downloading the favicon and invoking SetFavicon. } - request->ForwardResult(GetFavIconRequest::TupleType( + request->ForwardResult(GetFaviconRequest::TupleType( request->handle(), know_favicon, data, expired, icon_url)); } -void HistoryBackend::GetFavIconForURL( - scoped_refptr<GetFavIconRequest> request, +void HistoryBackend::GetFaviconForURL( + scoped_refptr<GetFaviconRequest> request, const GURL& page_url, int icon_types) { if (request->canceled()) @@ -1763,12 +1763,12 @@ void HistoryBackend::GetFavIconForURL( TimeDelta::FromDays(kFavIconRefetchDays); } - UMA_HISTOGRAM_TIMES("History.GetFavIconForURL", + UMA_HISTOGRAM_TIMES("History.GetFavIconForURL", // historical name TimeTicks::Now() - beginning_time); } request->ForwardResult( - GetFavIconRequest::TupleType(request->handle(), know_favicon, data, + GetFaviconRequest::TupleType(request->handle(), know_favicon, data, expired, icon_url)); } @@ -1781,7 +1781,7 @@ void HistoryBackend::SetFavicon( if (!thumbnail_db_.get() || !db_.get()) return; - FavIconID id = thumbnail_db_->GetFavIconIDForFavIconURL( + FavIconID id = thumbnail_db_->GetFaviconIDForFaviconURL( icon_url, icon_type, NULL); if (!id) id = thumbnail_db_->AddFavIcon(icon_url, icon_type); diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h index 21ec989..f5b653f 100644 --- a/chrome/browser/history/history_backend.h +++ b/chrome/browser/history/history_backend.h @@ -209,11 +209,11 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, // Favicon ------------------------------------------------------------------- - void GetFavicon(scoped_refptr<GetFavIconRequest> request, + void GetFavicon(scoped_refptr<GetFaviconRequest> request, const GURL& icon_url, int icon_types); - void GetFavIconForURL(scoped_refptr<GetFavIconRequest> request, + void GetFaviconForURL(scoped_refptr<GetFaviconRequest> request, const GURL& page_url, int icon_types); @@ -222,7 +222,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, scoped_refptr<RefCountedMemory> data, IconType icon_type); - void UpdateFavIconMappingAndFetch(scoped_refptr<GetFavIconRequest> request, + void UpdateFavIconMappingAndFetch(scoped_refptr<GetFaviconRequest> request, const GURL& page_url, const GURL& icon_url, IconType icon_type); @@ -451,7 +451,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, void UpdateFavIconMappingAndFetchImpl( const GURL* page_url, const GURL& icon_url, - scoped_refptr<GetFavIconRequest> request, + scoped_refptr<GetFaviconRequest> request, int icon_type); // Sets the favicon url id for page_url to id. This will also broadcast diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc index a1f423c..f518a53 100644 --- a/chrome/browser/history/history_backend_unittest.cc +++ b/chrome/browser/history/history_backend_unittest.cc @@ -323,10 +323,10 @@ 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, FAVICON, NULL); + GetFaviconIDForFaviconURL(favicon_url1, FAVICON, NULL); EXPECT_TRUE(out_favicon1); FavIconID out_favicon2 = backend_->thumbnail_db_-> - GetFavIconIDForFavIconURL(favicon_url2, FAVICON, 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 @@ -399,7 +399,7 @@ TEST_F(HistoryBackendTest, URLsNoLongerBookmarked) { EXPECT_EQ(0U, visits.size()); // The favicon should still be valid. EXPECT_EQ(favicon2, - backend_->thumbnail_db_->GetFavIconIDForFavIconURL(favicon_url2, + backend_->thumbnail_db_->GetFaviconIDForFaviconURL(favicon_url2, FAVICON, NULL)); @@ -415,7 +415,7 @@ TEST_F(HistoryBackendTest, URLsNoLongerBookmarked) { EXPECT_FALSE(backend_->db_->GetRowForURL(row2.url(), &tmp_url_row)); // And the favicon should be deleted. EXPECT_EQ(0, - backend_->thumbnail_db_->GetFavIconIDForFavIconURL(favicon_url2, + backend_->thumbnail_db_->GetFaviconIDForFaviconURL(favicon_url2, FAVICON, NULL)); @@ -437,7 +437,7 @@ TEST_F(HistoryBackendTest, URLsNoLongerBookmarked) { // The favicon should still be valid. EXPECT_EQ(favicon1, - backend_->thumbnail_db_->GetFavIconIDForFavIconURL(favicon_url1, + backend_->thumbnail_db_->GetFaviconIDForFaviconURL(favicon_url1, FAVICON, NULL)); } @@ -893,7 +893,7 @@ TEST_F(HistoryBackendTest, SetFaviconMapping) { const GURL icon_url2("http://www.google.com/icon2"); backend_->SetFavicon( url1, icon_url2, RefCountedBytes::TakeVector(&data), FAVICON); - FavIconID icon_id = backend_->thumbnail_db_->GetFavIconIDForFavIconURL( + FavIconID icon_id = backend_->thumbnail_db_->GetFaviconIDForFaviconURL( icon_url2, FAVICON, NULL); EXPECT_NE(0, icon_id); std::vector<IconMapping> icon_mapping; @@ -913,7 +913,7 @@ TEST_F(HistoryBackendTest, AddOrUpdateIconMapping) { backend_->SetFavicon( url, icon_url, RefCountedBytes::TakeVector(&data), FAVICON); - FavIconID icon_id = backend_->thumbnail_db_->GetFavIconIDForFavIconURL( + FavIconID icon_id = backend_->thumbnail_db_->GetFaviconIDForFaviconURL( icon_url, FAVICON, NULL); // Add the same mapping diff --git a/chrome/browser/history/history_marshaling.h b/chrome/browser/history/history_marshaling.h index b270b74..2eff411 100644 --- a/chrome/browser/history/history_marshaling.h +++ b/chrome/browser/history/history_marshaling.h @@ -51,7 +51,7 @@ typedef CancelableRequest<HistoryService::ThumbnailDataCallback> // Favicons ------------------------------------------------------------------- typedef CancelableRequest<FaviconService::FaviconDataCallback> - GetFavIconRequest; + GetFaviconRequest; // Downloads ------------------------------------------------------------------ diff --git a/chrome/browser/history/thumbnail_database.cc b/chrome/browser/history/thumbnail_database.cc index c50d998..63cafb2 100644 --- a/chrome/browser/history/thumbnail_database.cc +++ b/chrome/browser/history/thumbnail_database.cc @@ -399,7 +399,7 @@ bool ThumbnailDatabase::SetFaviconLastUpdateTime(FavIconID icon_id, return statement.Run(); } -FavIconID ThumbnailDatabase::GetFavIconIDForFavIconURL(const GURL& icon_url, +FavIconID ThumbnailDatabase::GetFaviconIDForFaviconURL(const GURL& icon_url, int required_icon_type, IconType* icon_type) { sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE, diff --git a/chrome/browser/history/thumbnail_database.h b/chrome/browser/history/thumbnail_database.h index e88e737..dbcb2ec 100644 --- a/chrome/browser/history/thumbnail_database.h +++ b/chrome/browser/history/thumbnail_database.h @@ -112,7 +112,7 @@ class ThumbnailDatabase { // 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, + FavIconID GetFaviconIDForFaviconURL(const GURL& icon_url, int required_icon_type, IconType* icon_type); |