summaryrefslogtreecommitdiffstats
path: root/chrome/browser/favicon
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-25 03:59:51 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-25 03:59:51 +0000
commit36fc039f12944d61df900690238a5d0303f457dd (patch)
tree1f53b1b2a137bb60bf4e696dd5e6cb706833cc2d /chrome/browser/favicon
parent12f75ab37393f57fcac33c39673793f1579b665c (diff)
downloadchromium_src-36fc039f12944d61df900690238a5d0303f457dd.zip
chromium_src-36fc039f12944d61df900690238a5d0303f457dd.tar.gz
chromium_src-36fc039f12944d61df900690238a5d0303f457dd.tar.bz2
Create a Content API around NavigationEntry that's in content/public/browser. NavigationEntry will be renamed to NavigationEntryImpl in a later change. It now derives from content::NavigationEntry. Most of this change is changing unix_hacker functions to CamelCase and updating callers.
BUG=98716 TBR=brettw Review URL: http://codereview.chromium.org/9007043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/favicon')
-rw-r--r--chrome/browser/favicon/favicon_handler.cc13
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.cc8
2 files changed, 11 insertions, 10 deletions
diff --git a/chrome/browser/favicon/favicon_handler.cc b/chrome/browser/favicon/favicon_handler.cc
index f365683..d317252 100644
--- a/chrome/browser/favicon/favicon_handler.cc
+++ b/chrome/browser/favicon/favicon_handler.cc
@@ -210,7 +210,7 @@ void FaviconHandler::OnUpdateFaviconURL(
}
if (got_favicon_from_history_)
- DownloadFaviconOrAskHistory(entry->url(), current_candidate()->icon_url,
+ DownloadFaviconOrAskHistory(entry->GetURL(), current_candidate()->icon_url,
ToHistoryIconType(current_candidate()->icon_type));
}
@@ -246,7 +246,7 @@ void FaviconHandler::OnDidDownloadFavicon(int id,
NavigationEntry* FaviconHandler::GetEntry() {
NavigationEntry* entry = delegate_->GetActiveEntry();
- if (entry && entry->url() == url_)
+ if (entry && entry->GetURL() == url_)
return entry;
// If the URL has changed out from under us (as will happen with redirects)
@@ -343,14 +343,15 @@ void FaviconHandler::OnFaviconDataForInitialURL(
// Mapping in the database is wrong. DownloadFavIconOrAskHistory will
// update the mapping for this url and download the favicon if we don't
// already have it.
- DownloadFaviconOrAskHistory(entry->url(), current_candidate()->icon_url,
+ DownloadFaviconOrAskHistory(entry->GetURL(),
+ current_candidate()->icon_url,
static_cast<history::IconType>(current_candidate()->icon_type));
}
} else if (current_candidate()) {
// We know the official url for the favicon, by either don't have the
// favicon or its expired. Continue on to DownloadFaviconOrAskHistory to
// either download or check history again.
- DownloadFaviconOrAskHistory(entry->url(), current_candidate()->icon_url,
+ DownloadFaviconOrAskHistory(entry->GetURL(), current_candidate()->icon_url,
ToHistoryIconType(current_candidate()->icon_type));
}
// else we haven't got the icon url. When we get it we'll ask the
@@ -404,7 +405,7 @@ void FaviconHandler::OnFaviconData(FaviconService::Handle handle,
if (!favicon.known_icon || favicon.expired) {
// We don't know the favicon, or it is out of date. Request the current
// one.
- ScheduleDownload(entry->url(), entry->favicon().url(),
+ ScheduleDownload(entry->GetURL(), entry->favicon().url(),
preferred_icon_size(),
history::FAVICON,
FaviconTabHelper::ImageDownloadCallback());
@@ -414,7 +415,7 @@ void FaviconHandler::OnFaviconData(FaviconService::Handle handle,
*current_candidate(), favicon.icon_url, favicon.icon_type)))) {
// We don't know the favicon, it is out of date or its type is not same as
// one got from page. Request the current one.
- ScheduleDownload(entry->url(), current_candidate()->icon_url,
+ ScheduleDownload(entry->GetURL(), current_candidate()->icon_url,
preferred_icon_size(),
ToHistoryIconType(current_candidate()->icon_type),
FaviconTabHelper::ImageDownloadCallback());
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index 4f80151..3e59fbb 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -80,7 +80,7 @@ bool FaviconTabHelper::ShouldDisplayFavicon() {
void FaviconTabHelper::SaveFavicon() {
NavigationEntry* entry = tab_contents()->GetController().GetActiveEntry();
- if (!entry || entry->url().is_empty())
+ if (!entry || entry->GetURL().is_empty())
return;
// Make sure the page is in history, otherwise adding the favicon does
@@ -89,7 +89,7 @@ void FaviconTabHelper::SaveFavicon() {
GetOriginalProfile()->GetHistoryService(Profile::IMPLICIT_ACCESS);
if (!history)
return;
- history->AddPageNoVisitForBookmark(entry->url());
+ history->AddPageNoVisitForBookmark(entry->GetURL());
FaviconService* service = profile_->
GetOriginalProfile()->GetFaviconService(Profile::IMPLICIT_ACCESS);
@@ -103,7 +103,7 @@ void FaviconTabHelper::SaveFavicon() {
std::vector<unsigned char> image_data;
gfx::PNGCodec::EncodeBGRASkBitmap(favicon.bitmap(), false, &image_data);
service->SetFavicon(
- entry->url(), favicon.url(), image_data, history::FAVICON);
+ entry->GetURL(), favicon.url(), image_data, history::FAVICON);
}
int FaviconTabHelper::DownloadImage(const GURL& image_url,
@@ -161,7 +161,7 @@ void FaviconTabHelper::DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) {
// Get the favicon, either from history or request it from the net.
- FetchFavicon(details.entry->url());
+ FetchFavicon(details.entry->GetURL());
}
bool FaviconTabHelper::OnMessageReceived(const IPC::Message& message) {