summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-15 19:41:09 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-15 19:41:09 +0000
commita945841f6a3c2adcabe2a830f0c9e0b18e1574ac (patch)
tree1cd7c14dea0b982d1869dbc5c4a280e3875b4734
parent162b5998f0e5caa333d9f348207b7f5a649f8eac (diff)
downloadchromium_src-a945841f6a3c2adcabe2a830f0c9e0b18e1574ac.zip
chromium_src-a945841f6a3c2adcabe2a830f0c9e0b18e1574ac.tar.gz
chromium_src-a945841f6a3c2adcabe2a830f0c9e0b18e1574ac.tar.bz2
fav icon -> favicon. Pass 9: chrome/browser/history
BUG=76073 TEST=none; no visible change Review URL: http://codereview.chromium.org/6696027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78261 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/bookmarks/bookmark_html_writer_unittest.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_model.cc2
-rw-r--r--chrome/browser/favicon_service.cc2
-rw-r--r--chrome/browser/favicon_service.h2
-rw-r--r--chrome/browser/history/expire_history_backend.cc2
-rw-r--r--chrome/browser/history/expire_history_backend_unittest.cc42
-rw-r--r--chrome/browser/history/history.cc4
-rw-r--r--chrome/browser/history/history.h5
-rw-r--r--chrome/browser/history/history_backend.cc38
-rw-r--r--chrome/browser/history/history_backend.h8
-rw-r--r--chrome/browser/history/history_backend_unittest.cc14
-rw-r--r--chrome/browser/history/history_notifications.cc4
-rw-r--r--chrome/browser/history/history_notifications.h6
-rw-r--r--chrome/browser/history/history_types.cc4
-rw-r--r--chrome/browser/history/history_types.h6
-rw-r--r--chrome/browser/history/page_usage_data.h2
-rw-r--r--chrome/browser/history/thumbnail_database.cc22
-rw-r--r--chrome/browser/history/thumbnail_database.h28
-rw-r--r--chrome/browser/history/thumbnail_database_unittest.cc32
-rw-r--r--chrome/browser/importer/external_process_importer_client.cc2
-rw-r--r--chrome/browser/importer/external_process_importer_client.h6
-rw-r--r--chrome/browser/importer/firefox2_importer.cc8
-rw-r--r--chrome/browser/importer/firefox2_importer.h4
-rw-r--r--chrome/browser/importer/firefox3_importer.cc6
-rw-r--r--chrome/browser/importer/firefox3_importer.h2
-rw-r--r--chrome/browser/importer/importer_bridge.cc4
-rw-r--r--chrome/browser/importer/importer_bridge.h6
-rw-r--r--chrome/browser/importer/importer_host.h2
-rw-r--r--chrome/browser/importer/importer_messages.h10
-rw-r--r--chrome/browser/importer/importer_unittest.cc4
-rw-r--r--chrome/browser/importer/profile_writer.cc2
-rw-r--r--chrome/browser/importer/profile_writer.h4
-rw-r--r--chrome/browser/importer/safari_importer.h2
-rw-r--r--chrome/browser/importer/safari_importer.mm6
-rw-r--r--chrome/browser/importer/safari_importer_unittest.mm6
-rw-r--r--chrome/browser/profile_import_process_host.h2
-rw-r--r--chrome/browser/ui/cocoa/history_menu_bridge.mm2
-rw-r--r--chrome/profile_import/profile_import_thread.cc8
-rw-r--r--chrome/profile_import/profile_import_thread.h2
39 files changed, 156 insertions, 157 deletions
diff --git a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
index e7b2a6c..88377f8 100644
--- a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
@@ -227,7 +227,7 @@ TEST_F(BookmarkHTMLWriterTest, Test) {
// Read the bookmarks back in.
std::vector<ProfileWriter::BookmarkEntry> parsed_bookmarks;
- std::vector<history::ImportedFavIconUsage> favicons;
+ std::vector<history::ImportedFaviconUsage> favicons;
Firefox2Importer::ImportBookmarksFile(path_, std::set<GURL>(),
false, L"x", NULL, &parsed_bookmarks,
NULL, &favicons);
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index a1fb852..a81950d 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -785,7 +785,7 @@ void BookmarkModel::Observe(NotificationType type,
switch (type.value) {
case NotificationType::FAVICON_CHANGED: {
// Prevent the observers from getting confused for multiple favicon loads.
- Details<history::FavIconChangeDetails> favicon_details(details);
+ Details<history::FaviconChangeDetails> favicon_details(details);
for (std::set<GURL>::const_iterator i = favicon_details->urls.begin();
i != favicon_details->urls.end(); ++i) {
std::vector<const BookmarkNode*> nodes;
diff --git a/chrome/browser/favicon_service.cc b/chrome/browser/favicon_service.cc
index 3a30949..58e92ca 100644
--- a/chrome/browser/favicon_service.cc
+++ b/chrome/browser/favicon_service.cc
@@ -69,7 +69,7 @@ void FaviconService::SetFaviconOutOfDateForPage(const GURL& page_url) {
}
void FaviconService::SetImportedFavicons(
- const std::vector<history::ImportedFavIconUsage>& favicon_usage) {
+ const std::vector<history::ImportedFaviconUsage>& favicon_usage) {
HistoryService* hs = profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
if (hs)
hs->SetImportedFavicons(favicon_usage);
diff --git a/chrome/browser/favicon_service.h b/chrome/browser/favicon_service.h
index 3c0a0e3..8fd273b 100644
--- a/chrome/browser/favicon_service.h
+++ b/chrome/browser/favicon_service.h
@@ -79,7 +79,7 @@ class FaviconService : public CancelableRequestProvider,
// must exist, any favicon sets for unknown pages will be discarded. Existing
// favicons will not be overwritten.
void SetImportedFavicons(
- const std::vector<history::ImportedFavIconUsage>& favicon_usage);
+ const std::vector<history::ImportedFaviconUsage>& favicon_usage);
// Sets the favicon for a page.
void SetFavicon(const GURL& page_url,
diff --git a/chrome/browser/history/expire_history_backend.cc b/chrome/browser/history/expire_history_backend.cc
index 5b603ad..b1c8210 100644
--- a/chrome/browser/history/expire_history_backend.cc
+++ b/chrome/browser/history/expire_history_backend.cc
@@ -323,7 +323,7 @@ void ExpireHistoryBackend::DeleteFaviconsIfPossible(
for (std::set<FaviconID>::const_iterator i = favicon_set.begin();
i != favicon_set.end(); ++i) {
if (!thumb_db_->HasMappingFor(*i))
- thumb_db_->DeleteFavIcon(*i);
+ thumb_db_->DeleteFavicon(*i);
}
}
diff --git a/chrome/browser/history/expire_history_backend_unittest.cc b/chrome/browser/history/expire_history_backend_unittest.cc
index 453100c..3ff7843 100644
--- a/chrome/browser/history/expire_history_backend_unittest.cc
+++ b/chrome/browser/history/expire_history_backend_unittest.cc
@@ -65,7 +65,7 @@ class ExpireHistoryTest : public testing::Test,
void AddExampleSourceData(const GURL& url, URLID* id);
// Returns true if the given favicon/thumanil has an entry in the DB.
- bool HasFavIcon(FaviconID favicon_id);
+ bool HasFavicon(FaviconID favicon_id);
bool HasThumbnail(URLID url_id);
FaviconID GetFavicon(const GURL& page_url, IconType icon_type);
@@ -200,9 +200,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"),
+ FaviconID favicon1 = thumb_db_->AddFavicon(GURL("http://favicon/url1"),
FAVICON);
- FaviconID favicon2 = thumb_db_->AddFavIcon(GURL("http://favicon/url2"),
+ FaviconID favicon2 = thumb_db_->AddFavicon(GURL("http://favicon/url2"),
FAVICON);
// Three URLs.
@@ -310,7 +310,7 @@ void ExpireHistoryTest::AddExampleSourceData(const GURL& url, URLID* id) {
main_db_->AddVisit(&visit_row4, SOURCE_FIREFOX_IMPORTED);
}
-bool ExpireHistoryTest::HasFavIcon(FaviconID favicon_id) {
+bool ExpireHistoryTest::HasFavicon(FaviconID favicon_id) {
if (!thumb_db_.get() || favicon_id == 0)
return false;
Time last_updated;
@@ -413,20 +413,20 @@ 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, FAVICON);
+ FaviconID icon_id = thumb_db_->AddFavicon(favicon_url, FAVICON);
EXPECT_TRUE(icon_id);
- EXPECT_TRUE(HasFavIcon(icon_id));
+ EXPECT_TRUE(HasFavicon(icon_id));
// The favicon should be deletable with no users.
std::set<FaviconID> favicon_set;
favicon_set.insert(icon_id);
expirer_.DeleteFaviconsIfPossible(favicon_set);
- EXPECT_FALSE(HasFavIcon(icon_id));
+ EXPECT_FALSE(HasFavicon(icon_id));
// Add back the favicon.
- icon_id = thumb_db_->AddFavIcon(favicon_url, TOUCH_ICON);
+ icon_id = thumb_db_->AddFavicon(favicon_url, TOUCH_ICON);
EXPECT_TRUE(icon_id);
- EXPECT_TRUE(HasFavIcon(icon_id));
+ EXPECT_TRUE(HasFavicon(icon_id));
// Add a page that references the favicon.
URLRow row(GURL("http://www.google.com/2"));
@@ -438,7 +438,7 @@ TEST_F(ExpireHistoryTest, DeleteFaviconsIfPossible) {
favicon_set.clear();
favicon_set.insert(icon_id);
expirer_.DeleteFaviconsIfPossible(favicon_set);
- EXPECT_TRUE(HasFavIcon(icon_id));
+ EXPECT_TRUE(HasFavicon(icon_id));
}
// static
@@ -461,7 +461,7 @@ TEST_F(ExpireHistoryTest, FLAKY_DeleteURLAndFavicon) {
URLRow last_row;
ASSERT_TRUE(main_db_->GetURLRow(url_ids[2], &last_row));
FaviconID favicon_id = GetFavicon(last_row.url(), FAVICON);
- EXPECT_TRUE(HasFavIcon(favicon_id));
+ EXPECT_TRUE(HasFavicon(favicon_id));
// TODO(sky): fix this, see comment in HasThumbnail.
// EXPECT_TRUE(HasThumbnail(url_ids[2]));
@@ -511,7 +511,7 @@ TEST_F(ExpireHistoryTest, FLAKY_DeleteURLAndFavicon) {
// All the normal data + the favicon should be gone.
EnsureURLInfoGone(last_row);
EXPECT_FALSE(GetFavicon(last_row.url(), FAVICON));
- EXPECT_FALSE(HasFavIcon(favicon_id));
+ EXPECT_FALSE(HasFavicon(favicon_id));
}
// Deletes a URL with a favicon that other URLs reference, so that the favicon
@@ -525,7 +525,7 @@ TEST_F(ExpireHistoryTest, DeleteURLWithoutFavicon) {
URLRow last_row;
ASSERT_TRUE(main_db_->GetURLRow(url_ids[1], &last_row));
FaviconID favicon_id = GetFavicon(last_row.url(), FAVICON);
- EXPECT_TRUE(HasFavIcon(favicon_id));
+ 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(favicon_id));
+ EXPECT_TRUE(HasFavicon(favicon_id));
}
// DeleteURL should not delete starred urls.
@@ -563,7 +563,7 @@ TEST_F(ExpireHistoryTest, DontDeleteStarredURL) {
// And the favicon should exist.
FaviconID favicon_id = GetFavicon(url_row.url(), FAVICON);
- EXPECT_TRUE(HasFavIcon(favicon_id));
+ EXPECT_TRUE(HasFavicon(favicon_id));
// But there should be no fts.
ASSERT_EQ(0, CountTextMatchesForURL(url_row.url()));
@@ -633,14 +633,14 @@ TEST_F(ExpireHistoryTest, FlushRecentURLsUnstarred) {
// Verify that the middle URL's favicon and thumbnail is still there.
FaviconID favicon_id = GetFavicon(url_row1.url(), FAVICON);
- EXPECT_TRUE(HasFavIcon(favicon_id));
+ 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 favicon_id2 = GetFavicon(url_row2.url(), FAVICON);
EnsureURLInfoGone(url_row2);
- EXPECT_FALSE(HasFavIcon(favicon_id2));
+ EXPECT_FALSE(HasFavicon(favicon_id2));
}
// Expires only a specific URLs more recent than a given time, with no starred
@@ -692,13 +692,13 @@ TEST_F(ExpireHistoryTest, FlushRecentURLsUnstarredRestricted) {
// Verify that the middle URL's favicon and thumbnail is still there.
FaviconID favicon_id = GetFavicon(url_row1.url(), FAVICON);
- EXPECT_TRUE(HasFavIcon(favicon_id));
+ 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(favicon_id));
+ EXPECT_TRUE(HasFavicon(favicon_id));
// TODO(sky): fix this, see comment in HasThumbnail.
// EXPECT_TRUE(HasThumbnail(url_row2.id()));
}
@@ -741,11 +741,11 @@ TEST_F(ExpireHistoryTest, FlushRecentURLsStarred) {
// exists in history, this should not be a privacy problem, we only update
// the visit counts in this case for consistency anyway.
FaviconID favicon_id = GetFavicon(url_row1.url(), FAVICON);
- EXPECT_TRUE(HasFavIcon(favicon_id));
+ EXPECT_TRUE(HasFavicon(favicon_id));
// TODO(sky): fix this, see comment in HasThumbnail.
// EXPECT_TRUE(HasThumbnail(new_url_row1.id()));
favicon_id = GetFavicon(url_row1.url(), FAVICON);
- EXPECT_TRUE(HasFavIcon(favicon_id));
+ 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 4fac854..9ea6b4c 100644
--- a/chrome/browser/history/history.cc
+++ b/chrome/browser/history/history.cc
@@ -458,7 +458,7 @@ void HistoryService::UpdateFaviconMappingAndFetch(
FaviconService::GetFaviconRequest* request,
const GURL& page_url,
const GURL& icon_url) {
- Schedule(PRIORITY_NORMAL, &HistoryBackend::UpdateFavIconMappingAndFetch, NULL,
+ Schedule(PRIORITY_NORMAL, &HistoryBackend::UpdateFaviconMappingAndFetch, NULL,
request, page_url, icon_url, history::FAVICON);
}
@@ -487,7 +487,7 @@ void HistoryService::SetFaviconOutOfDateForPage(const GURL& page_url) {
}
void HistoryService::SetImportedFavicons(
- const std::vector<history::ImportedFavIconUsage>& favicon_usage) {
+ const std::vector<history::ImportedFaviconUsage>& favicon_usage) {
ScheduleAndForget(PRIORITY_NORMAL,
&HistoryBackend::SetImportedFavicons, favicon_usage);
}
diff --git a/chrome/browser/history/history.h b/chrome/browser/history/history.h
index f23c34f..6cbbd66 100644
--- a/chrome/browser/history/history.h
+++ b/chrome/browser/history/history.h
@@ -598,7 +598,6 @@ class HistoryService : public CancelableRequestProvider,
template<typename Info, typename Callback> friend class DownloadRequest;
friend class PageUsageRequest;
friend class RedirectRequest;
- friend class FavIconRequest;
friend class TestingProfile;
// Implementation of NotificationObserver.
@@ -635,7 +634,7 @@ class HistoryService : public CancelableRequestProvider,
// notification (NOTIFY_HISTORY_LOADED) and sets backend_loaded_ to true.
void OnDBLoaded();
- // FavIcon -------------------------------------------------------------------
+ // Favicon -------------------------------------------------------------------
// These favicon methods are exposed to the FaviconService. Instead of calling
// these methods directly you should call the respective method on the
@@ -663,7 +662,7 @@ class HistoryService : public CancelableRequestProvider,
// once. The pages must exist, any favicon sets for unknown pages will be
// discarded. Existing favicons will not be overwritten.
void SetImportedFavicons(
- const std::vector<history::ImportedFavIconUsage>& favicon_usage);
+ const std::vector<history::ImportedFaviconUsage>& favicon_usage);
// Used by the FaviconService to set the favicon for a page on the history
// backend.
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index b7bd1bb..a9913be 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -74,7 +74,7 @@ static const int kSegmentDataRetention = 90;
static const int kCommitIntervalMs = 10000;
// The amount of time before we re-fetch the favicon.
-static const int kFavIconRefetchDays = 7;
+static const int kFaviconRefetchDays = 7;
// GetSessionTabs returns all open tabs, or tabs closed kSessionCloseTimeWindow
// seconds ago.
@@ -1603,15 +1603,15 @@ bool HistoryBackend::GetThumbnailFromOlderRedirect(
void HistoryBackend::GetFavicon(scoped_refptr<GetFaviconRequest> request,
const GURL& icon_url,
int icon_types) {
- UpdateFavIconMappingAndFetchImpl(NULL, icon_url, request, icon_types);
+ UpdateFaviconMappingAndFetchImpl(NULL, icon_url, request, icon_types);
}
-void HistoryBackend::UpdateFavIconMappingAndFetch(
+void HistoryBackend::UpdateFaviconMappingAndFetch(
scoped_refptr<GetFaviconRequest> request,
const GURL& page_url,
const GURL& icon_url,
IconType icon_type) {
- UpdateFavIconMappingAndFetchImpl(&page_url, icon_url, request, icon_type);
+ UpdateFaviconMappingAndFetchImpl(&page_url, icon_url, request, icon_type);
}
void HistoryBackend::SetFaviconOutOfDateForPage(const GURL& page_url) {
@@ -1630,7 +1630,7 @@ void HistoryBackend::SetFaviconOutOfDateForPage(const GURL& page_url) {
}
void HistoryBackend::SetImportedFavicons(
- const std::vector<ImportedFavIconUsage>& favicon_usage) {
+ const std::vector<ImportedFaviconUsage>& favicon_usage) {
if (!db_.get() || !thumbnail_db_.get())
return;
@@ -1644,7 +1644,7 @@ void HistoryBackend::SetImportedFavicons(
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,
+ favicon_id = thumbnail_db_->AddFavicon(favicon_usage[i].favicon_url,
history::FAVICON);
if (!favicon_id)
continue; // Unable to add the favicon.
@@ -1686,13 +1686,13 @@ void HistoryBackend::SetImportedFavicons(
if (!favicons_changed.empty()) {
// Send the notification about the changed favicon URLs.
- FavIconChangeDetails* changed_details = new FavIconChangeDetails;
+ FaviconChangeDetails* changed_details = new FaviconChangeDetails;
changed_details->urls.swap(favicons_changed);
BroadcastNotifications(NotificationType::FAVICON_CHANGED, changed_details);
}
}
-void HistoryBackend::UpdateFavIconMappingAndFetchImpl(
+void HistoryBackend::UpdateFaviconMappingAndFetchImpl(
const GURL* page_url,
const GURL& icon_url,
scoped_refptr<GetFaviconRequest> request,
@@ -1720,7 +1720,7 @@ void HistoryBackend::UpdateFavIconMappingAndFetchImpl(
if (thumbnail_db_->GetFavicon(favicon_id, &last_updated, &data->data,
NULL)) {
expired = (Time::Now() - last_updated) >
- TimeDelta::FromDays(kFavIconRefetchDays);
+ TimeDelta::FromDays(kFaviconRefetchDays);
}
if (page_url)
@@ -1760,7 +1760,7 @@ void HistoryBackend::GetFaviconForURL(
&data->data, &icon_url)) {
know_favicon = true;
expired = (Time::Now() - last_updated) >
- TimeDelta::FromDays(kFavIconRefetchDays);
+ TimeDelta::FromDays(kFaviconRefetchDays);
}
UMA_HISTOGRAM_TIMES("History.GetFavIconForURL", // historical name
@@ -1784,7 +1784,7 @@ void HistoryBackend::SetFavicon(
FaviconID id = thumbnail_db_->GetFaviconIDForFaviconURL(
icon_url, icon_type, NULL);
if (!id)
- id = thumbnail_db_->AddFavIcon(icon_url, icon_type);
+ id = thumbnail_db_->AddFavicon(icon_url, icon_type);
// Set the image data.
thumbnail_db_->SetFavicon(id, data, Time::Now());
@@ -1829,14 +1829,14 @@ void HistoryBackend::SetFaviconMapping(const GURL& page_url,
// since normally a page will always map to the same favicon ID. It
// will mostly happen for favicons we import.
if (replaced_id && !thumbnail_db_->HasMappingFor(replaced_id))
- thumbnail_db_->DeleteFavIcon(replaced_id);
+ thumbnail_db_->DeleteFavicon(replaced_id);
favicons_changed.insert(*i);
}
}
// Send the notification about the changed favicons.
- FavIconChangeDetails* changed_details = new FavIconChangeDetails;
+ FaviconChangeDetails* changed_details = new FaviconChangeDetails;
changed_details->urls.swap(favicons_changed);
BroadcastNotifications(NotificationType::FAVICON_CHANGED, changed_details);
@@ -2167,15 +2167,15 @@ bool HistoryBackend::ClearAllThumbnailHistory(
// Create the duplicate favicon table, this is where the favicons we want
// to keep will be stored.
- if (!thumbnail_db_->InitTemporaryFavIconsTable())
+ if (!thumbnail_db_->InitTemporaryFaviconsTable())
return false;
if (!thumbnail_db_->InitTemporaryIconMappingTable())
return false;
// This maps existing favicon IDs to the ones in the temporary table.
- typedef std::map<FaviconID, FaviconID> FavIconMap;
- FavIconMap copied_favicons;
+ typedef std::map<FaviconID, FaviconID> FaviconMap;
+ FaviconMap copied_favicons;
// Copy all unique favicons to the temporary table, and update all the
// URLs to have the new IDs.
@@ -2189,9 +2189,9 @@ bool HistoryBackend::ClearAllThumbnailHistory(
m != icon_mappings.end(); ++m) {
FaviconID old_id = m->icon_id;
FaviconID new_id;
- FavIconMap::const_iterator found = copied_favicons.find(old_id);
+ FaviconMap::const_iterator found = copied_favicons.find(old_id);
if (found == copied_favicons.end()) {
- new_id = thumbnail_db_->CopyToTemporaryFavIconTable(old_id);
+ new_id = thumbnail_db_->CopyToTemporaryFaviconTable(old_id);
copied_favicons[old_id] = new_id;
} else {
// We already encountered a URL that used this favicon, use the ID we
@@ -2205,7 +2205,7 @@ bool HistoryBackend::ClearAllThumbnailHistory(
// Rename the duplicate favicon and icon_mapping back table and recreate the
// other tables. This will make the database consistent again.
- thumbnail_db_->CommitTemporaryFavIconTable();
+ thumbnail_db_->CommitTemporaryFaviconTable();
thumbnail_db_->CommitTemporaryIconMappingTable();
thumbnail_db_->RecreateThumbnailTable();
diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h
index aac90bd..f178ce3 100644
--- a/chrome/browser/history/history_backend.h
+++ b/chrome/browser/history/history_backend.h
@@ -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);
@@ -230,7 +230,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
void SetFaviconOutOfDateForPage(const GURL& page_url);
void SetImportedFavicons(
- const std::vector<ImportedFavIconUsage>& favicon_usage);
+ const std::vector<ImportedFaviconUsage>& favicon_usage);
// Downloads -----------------------------------------------------------------
@@ -443,12 +443,12 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
// Favicons ------------------------------------------------------------------
- // Used by both UpdateFavIconMappingAndFetch and GetFavicon.
+ // Used by both UpdateFaviconMappingAndFetch and GetFavicon.
// 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.
- void UpdateFavIconMappingAndFetchImpl(
+ void UpdateFaviconMappingAndFetchImpl(
const GURL* page_url,
const GURL& icon_url,
scoped_refptr<GetFaviconRequest> request,
diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc
index f8a0c3b..77e0003 100644
--- a/chrome/browser/history/history_backend_unittest.cc
+++ b/chrome/browser/history/history_backend_unittest.cc
@@ -216,9 +216,9 @@ TEST_F(HistoryBackendTest, DeleteAll) {
// deleted. This way we can test that updating works properly.
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,
+ FaviconID favicon2 = backend_->thumbnail_db_->AddFavicon(favicon_url2,
FAVICON);
- FaviconID favicon1 = backend_->thumbnail_db_->AddFavIcon(favicon_url1,
+ FaviconID favicon1 = backend_->thumbnail_db_->AddFavicon(favicon_url1,
FAVICON);
std::vector<unsigned char> data;
@@ -349,9 +349,9 @@ TEST_F(HistoryBackendTest, DeleteAll) {
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,
+ FaviconID favicon2 = backend_->thumbnail_db_->AddFavicon(favicon_url2,
FAVICON);
- FaviconID favicon1 = backend_->thumbnail_db_->AddFavIcon(favicon_url1,
+ FaviconID favicon1 = backend_->thumbnail_db_->AddFavicon(favicon_url1,
FAVICON);
std::vector<unsigned char> data;
@@ -522,7 +522,7 @@ TEST_F(HistoryBackendTest, ImportedFaviconsTest) {
// Setup test data - two Urls in the history, one with favicon assigned and
// one without.
GURL favicon_url1("http://www.google.com/favicon.ico");
- FaviconID favicon1 = backend_->thumbnail_db_->AddFavIcon(favicon_url1,
+ FaviconID favicon1 = backend_->thumbnail_db_->AddFavicon(favicon_url1,
FAVICON);
std::vector<unsigned char> data;
data.push_back('1');
@@ -549,8 +549,8 @@ TEST_F(HistoryBackendTest, ImportedFaviconsTest) {
// 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
// a favicon.
- std::vector<history::ImportedFavIconUsage> favicons;
- history::ImportedFavIconUsage favicon;
+ std::vector<history::ImportedFaviconUsage> favicons;
+ history::ImportedFaviconUsage favicon;
favicon.favicon_url = GURL("http://news.google.com/favicon.ico");
favicon.png_data.push_back('2');
favicon.urls.insert(row1.url());
diff --git a/chrome/browser/history/history_notifications.cc b/chrome/browser/history/history_notifications.cc
index 0fdfa94..83cbb3c 100644
--- a/chrome/browser/history/history_notifications.cc
+++ b/chrome/browser/history/history_notifications.cc
@@ -24,9 +24,9 @@ URLsStarredDetails::URLsStarredDetails(bool being_starred)
URLsStarredDetails::~URLsStarredDetails() {}
-FavIconChangeDetails::FavIconChangeDetails() {}
+FaviconChangeDetails::FaviconChangeDetails() {}
-FavIconChangeDetails::~FavIconChangeDetails() {}
+FaviconChangeDetails::~FaviconChangeDetails() {}
KeywordSearchTermDetails::KeywordSearchTermDetails() : keyword_id(0) {}
diff --git a/chrome/browser/history/history_notifications.h b/chrome/browser/history/history_notifications.h
index 0d82135..a34bf8e 100644
--- a/chrome/browser/history/history_notifications.h
+++ b/chrome/browser/history/history_notifications.h
@@ -77,9 +77,9 @@ struct URLsStarredDetails : public HistoryDetails {
};
// Details for NOTIFY_FAVICON_CHANGED.
-struct FavIconChangeDetails : public HistoryDetails {
- FavIconChangeDetails();
- virtual ~FavIconChangeDetails();
+struct FaviconChangeDetails : public HistoryDetails {
+ FaviconChangeDetails();
+ virtual ~FaviconChangeDetails();
std::set<GURL> urls;
};
diff --git a/chrome/browser/history/history_types.cc b/chrome/browser/history/history_types.cc
index 84edddd..77fc0e3 100644
--- a/chrome/browser/history/history_types.cc
+++ b/chrome/browser/history/history_types.cc
@@ -91,10 +91,10 @@ VisitRow::~VisitRow() {
// Favicons -------------------------------------------------------------------
-ImportedFavIconUsage::ImportedFavIconUsage() {
+ImportedFaviconUsage::ImportedFaviconUsage() {
}
-ImportedFavIconUsage::~ImportedFavIconUsage() {
+ImportedFaviconUsage::~ImportedFaviconUsage() {
}
// StarredEntry ----------------------------------------------------------------
diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h
index 5ef9696..bc41758 100644
--- a/chrome/browser/history/history_types.h
+++ b/chrome/browser/history/history_types.h
@@ -234,9 +234,9 @@ typedef std::vector<VisitRow> VisitVector;
// Favicons -------------------------------------------------------------------
// Used by the importer to set favicons for imported bookmarks.
-struct ImportedFavIconUsage {
- ImportedFavIconUsage();
- ~ImportedFavIconUsage();
+struct ImportedFaviconUsage {
+ ImportedFaviconUsage();
+ ~ImportedFaviconUsage();
// The URL of the favicon.
GURL favicon_url;
diff --git a/chrome/browser/history/page_usage_data.h b/chrome/browser/history/page_usage_data.h
index dece788..8ee4191 100644
--- a/chrome/browser/history/page_usage_data.h
+++ b/chrome/browser/history/page_usage_data.h
@@ -85,7 +85,7 @@ class PageUsageData {
void SetFavicon(SkBitmap* img);
- bool HasFavIcon() const {
+ bool HasFavicon() const {
return favicon_set_;
}
diff --git a/chrome/browser/history/thumbnail_database.cc b/chrome/browser/history/thumbnail_database.cc
index aae3fec..f67de9c 100644
--- a/chrome/browser/history/thumbnail_database.cc
+++ b/chrome/browser/history/thumbnail_database.cc
@@ -78,12 +78,12 @@ sql::InitStatus ThumbnailDatabase::Init(
if (!meta_table_.Init(&db_, kCurrentVersionNumber,
kCompatibleVersionNumber) ||
!InitThumbnailTable() ||
- !InitFavIconsTable(&db_, false) ||
+ !InitFaviconsTable(&db_, false) ||
!InitIconMappingTable(&db_, false)) {
db_.Close();
return sql::INIT_FAILURE;
}
- InitFavIconsIndex();
+ InitFaviconsIndex();
InitIconMappingIndex();
// Version check. We should not encounter a database too old for us to handle
@@ -190,7 +190,7 @@ bool ThumbnailDatabase::RecreateThumbnailTable() {
return InitThumbnailTable();
}
-bool ThumbnailDatabase::InitFavIconsTable(sql::Connection* db,
+bool ThumbnailDatabase::InitFaviconsTable(sql::Connection* db,
bool is_temporary) {
// Note: if you update the schema, don't forget to update
// CopyToTemporaryFaviconTable as well.
@@ -214,7 +214,7 @@ bool ThumbnailDatabase::InitFavIconsTable(sql::Connection* db,
return true;
}
-void ThumbnailDatabase::InitFavIconsIndex() {
+void ThumbnailDatabase::InitFaviconsIndex() {
// Add an index on the url column. We ignore errors. Since this is always
// called during startup, the index will normally already exist.
db_.Execute("CREATE INDEX favicons_url ON favicons(url)");
@@ -444,7 +444,7 @@ bool ThumbnailDatabase::GetFavicon(
return true;
}
-FaviconID ThumbnailDatabase::AddFavIcon(const GURL& icon_url,
+FaviconID ThumbnailDatabase::AddFavicon(const GURL& icon_url,
IconType icon_type) {
sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
@@ -459,7 +459,7 @@ FaviconID ThumbnailDatabase::AddFavIcon(const GURL& icon_url,
return db_.GetLastInsertRowId();
}
-bool ThumbnailDatabase::DeleteFavIcon(FaviconID id) {
+bool ThumbnailDatabase::DeleteFavicon(FaviconID id) {
sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
"DELETE FROM favicons WHERE id = ?"));
if (!statement)
@@ -588,7 +588,7 @@ bool ThumbnailDatabase::CommitTemporaryIconMappingTable() {
return true;
}
-FaviconID ThumbnailDatabase::CopyToTemporaryFavIconTable(FaviconID source) {
+FaviconID ThumbnailDatabase::CopyToTemporaryFaviconTable(FaviconID source) {
sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
"INSERT INTO temp_favicons (url, last_updated, image_data, icon_type)"
"SELECT url, last_updated, image_data, icon_type "
@@ -603,7 +603,7 @@ FaviconID ThumbnailDatabase::CopyToTemporaryFavIconTable(FaviconID source) {
return db_.GetLastInsertRowId();
}
-bool ThumbnailDatabase::CommitTemporaryFavIconTable() {
+bool ThumbnailDatabase::CommitTemporaryFaviconTable() {
// Delete the old favicons table.
if (!db_.Execute("DROP TABLE favicons"))
return false;
@@ -613,7 +613,7 @@ bool ThumbnailDatabase::CommitTemporaryFavIconTable() {
return false;
// The renamed table needs the index (the temporary table doesn't have one).
- InitFavIconsIndex();
+ InitFaviconsIndex();
return true;
}
@@ -628,7 +628,7 @@ bool ThumbnailDatabase::RenameAndDropThumbnails(const FilePath& old_db_file,
if (OpenDatabase(&favicons, new_db_file) != sql::INIT_OK)
return false;
- if (!InitFavIconsTable(&favicons, false) ||
+ if (!InitFaviconsTable(&favicons, false) ||
!InitIconMappingTable(&favicons, false)) {
NOTREACHED() << "Couldn't init favicons and icon-mapping table.";
favicons.Close();
@@ -687,7 +687,7 @@ bool ThumbnailDatabase::RenameAndDropThumbnails(const FilePath& old_db_file,
file_util::Delete(old_db_file, false);
- InitFavIconsIndex();
+ InitFaviconsIndex();
// Reopen the transaction.
BeginTransaction();
diff --git a/chrome/browser/history/thumbnail_database.h b/chrome/browser/history/thumbnail_database.h
index 1edc722..716af94 100644
--- a/chrome/browser/history/thumbnail_database.h
+++ b/chrome/browser/history/thumbnail_database.h
@@ -93,7 +93,7 @@ class ThumbnailDatabase {
// Returns true on success.
bool RecreateThumbnailTable();
- // FavIcons ------------------------------------------------------------------
+ // Favicons ------------------------------------------------------------------
// 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
@@ -124,10 +124,10 @@ class ThumbnailDatabase {
GURL* icon_url);
// Adds the favicon URL and icon type to the favicon db, returning its id.
- FaviconID AddFavIcon(const GURL& icon_url, IconType icon_type);
+ FaviconID AddFavicon(const GURL& icon_url, IconType icon_type);
// Delete the favicon with the provided id. Returns false on failure
- bool DeleteFavIcon(FaviconID id);
+ bool DeleteFavicon(FaviconID id);
// Icon Mapping --------------------------------------------------------------
//
@@ -187,28 +187,28 @@ class ThumbnailDatabase {
// over will be deleted. Returns true on success.
bool CommitTemporaryIconMappingTable();
- // Temporary FavIcons --------------------------------------------------------
+ // Temporary Favicons --------------------------------------------------------
// Create a temporary table to store favicons. Favicons will be copied to
- // this table by CopyToTemporaryFavIconTable() and then the original table
+ // this table by CopyToTemporaryFaviconTable() and then the original table
// will be dropped, leaving only those copied favicons remaining. This is
// used to quickly delete most of the favicons when clearing history.
- bool InitTemporaryFavIconsTable() {
- return InitFavIconsTable(&db_, true);
+ bool InitTemporaryFaviconsTable() {
+ return InitFaviconsTable(&db_, true);
}
// Copies the given favicon from the "main" favicon table to the temporary
- // one. This is only valid in between calls to InitTemporaryFavIconsTable()
- // and CommitTemporaryFavIconTable().
+ // one. This is only valid in between calls to InitTemporaryFaviconsTable()
+ // and CommitTemporaryFaviconTable().
//
// The ID of the favicon will change when this copy takes place. The new ID
// is returned, or 0 on failure.
- FaviconID CopyToTemporaryFavIconTable(FaviconID source);
+ FaviconID CopyToTemporaryFaviconTable(FaviconID source);
// Replaces the main URL table with the temporary table created by
- // InitTemporaryFavIconsTable(). This will mean all favicons not copied over
+ // InitTemporaryFaviconsTable(). This will mean all favicons not copied over
// will be deleted. Returns true on success.
- bool CommitTemporaryFavIconTable();
+ bool CommitTemporaryFaviconTable();
// Returns true iff the thumbnails table exists.
// Migrating to TopSites is dropping the thumbnails table.
@@ -234,7 +234,7 @@ class ThumbnailDatabase {
// |db| is the connection to use for initializing the table.
// A different connection is used in RenameAndDropThumbnails, when we
// need to copy the favicons between two database files.
- bool InitFavIconsTable(sql::Connection* db, bool is_temporary);
+ bool InitFaviconsTable(sql::Connection* db, bool is_temporary);
// Adds support for the new metadata on web page thumbnails.
bool UpgradeToVersion3();
@@ -250,7 +250,7 @@ class ThumbnailDatabase {
// initialization after the table is created. This is a separate function
// because it is used by SwapFaviconTables to create an index over the
// newly-renamed favicons table (formerly the temporary table with no index).
- void InitFavIconsIndex();
+ void InitFaviconsIndex();
// Creates the icon_map table, return true if the table already exists or was
// successfully created.
diff --git a/chrome/browser/history/thumbnail_database_unittest.cc b/chrome/browser/history/thumbnail_database_unittest.cc
index 543c395..a1cc01d 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, FAVICON);
+ 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_));
@@ -145,7 +145,7 @@ TEST_F(ThumbnailDatabaseTest, AddIconMapping) {
scoped_refptr<RefCountedBytes> favicon(new RefCountedBytes(data));
GURL url("http://google.com");
- FaviconID id = db.AddFavIcon(url, TOUCH_ICON);
+ FaviconID id = db.AddFavicon(url, TOUCH_ICON);
EXPECT_NE(0, id);
base::Time time = base::Time::Now();
db.SetFavicon(id, favicon, time);
@@ -167,7 +167,7 @@ TEST_F(ThumbnailDatabaseTest, UpdateIconMapping) {
scoped_refptr<RefCountedBytes> favicon(new RefCountedBytes(data));
GURL url("http://google.com");
- FaviconID id = db.AddFavIcon(url, TOUCH_ICON);
+ FaviconID id = db.AddFavicon(url, TOUCH_ICON);
base::Time time = base::Time::Now();
db.SetFavicon(id, favicon, time);
@@ -179,7 +179,7 @@ TEST_F(ThumbnailDatabaseTest, UpdateIconMapping) {
EXPECT_EQ(id, icon_mapping.front().icon_id);
GURL url1("http://www.google.com/");
- FaviconID new_id = db.AddFavIcon(url1, TOUCH_ICON);
+ FaviconID new_id = db.AddFavicon(url1, TOUCH_ICON);
EXPECT_TRUE(db.UpdateIconMapping(icon_mapping.front().mapping_id, new_id));
icon_mapping.clear();
@@ -199,12 +199,12 @@ TEST_F(ThumbnailDatabaseTest, DeleteIconMappings) {
scoped_refptr<RefCountedBytes> favicon(new RefCountedBytes(data));
GURL url("http://google.com");
- FaviconID id = db.AddFavIcon(url, TOUCH_ICON);
+ FaviconID id = db.AddFavicon(url, TOUCH_ICON);
base::Time time = base::Time::Now();
db.SetFavicon(id, favicon, time);
EXPECT_TRUE(0 < db.AddIconMapping(url, id));
- FaviconID id2 = db.AddFavIcon(url, FAVICON);
+ FaviconID id2 = db.AddFavicon(url, FAVICON);
db.SetFavicon(id2, favicon, time);
EXPECT_TRUE(0 < db.AddIconMapping(url, id2));
ASSERT_NE(id, id2);
@@ -231,12 +231,12 @@ TEST_F(ThumbnailDatabaseTest, GetIconMappingsForPageURL) {
GURL url("http://google.com");
- FaviconID id1 = db.AddFavIcon(url, TOUCH_ICON);
+ FaviconID id1 = db.AddFavicon(url, TOUCH_ICON);
base::Time time = base::Time::Now();
db.SetFavicon(id1, favicon, time);
EXPECT_TRUE(0 < db.AddIconMapping(url, id1));
- FaviconID id2 = db.AddFavIcon(url, FAVICON);
+ FaviconID id2 = db.AddFavicon(url, FAVICON);
EXPECT_NE(id1, id2);
db.SetFavicon(id2, favicon, time);
EXPECT_TRUE(0 < db.AddIconMapping(url, id2));
@@ -275,7 +275,7 @@ TEST_F(ThumbnailDatabaseTest, UpgradeToVersion4) {
scoped_refptr<RefCountedBytes> favicon(new RefCountedBytes(data));
GURL url("http://google.com");
- FaviconID id = db.AddFavIcon(url, TOUCH_ICON);
+ FaviconID id = db.AddFavicon(url, TOUCH_ICON);
base::Time time = base::Time::Now();
db.SetFavicon(id, favicon, time);
@@ -299,7 +299,7 @@ TEST_F(ThumbnailDatabaseTest, TemporayIconMapping) {
scoped_refptr<RefCountedBytes> favicon(new RefCountedBytes(data));
GURL url("http://google.com");
- FaviconID id = db.AddFavIcon(url, FAVICON);
+ FaviconID id = db.AddFavicon(url, FAVICON);
base::Time time = base::Time::Now();
db.SetFavicon(id, favicon, time);
@@ -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, FAVICON);
+ FaviconID id = db.AddFavicon(url, FAVICON);
base::Time time = base::Time::Now();
db.SetFavicon(id, favicon, time);
@@ -337,7 +337,7 @@ TEST_F(ThumbnailDatabaseTest, GetIconMappingsForPageURLForReturnOrder) {
std::vector<unsigned char> data2(blob2, blob2 + sizeof(blob2));
scoped_refptr<RefCountedBytes> favicon2(new RefCountedBytes(data));
- FaviconID id2 = db.AddFavIcon(url, TOUCH_ICON);
+ FaviconID id2 = db.AddFavicon(url, TOUCH_ICON);
db.SetFavicon(id2, favicon2, time);
EXPECT_NE(0, db.AddIconMapping(url, id2));
@@ -351,7 +351,7 @@ TEST_F(ThumbnailDatabaseTest, GetIconMappingsForPageURLForReturnOrder) {
// Add a touch precomposed icon
scoped_refptr<RefCountedBytes> favicon3(new RefCountedBytes(data2));
- FaviconID id3 = db.AddFavIcon(url, TOUCH_PRECOMPOSED_ICON);
+ FaviconID id3 = db.AddFavicon(url, TOUCH_PRECOMPOSED_ICON);
db.SetFavicon(id3, favicon3, time);
EXPECT_NE(0, db.AddIconMapping(url, id3));
@@ -372,19 +372,19 @@ 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"), FAVICON);
+ FaviconID id1 = db.AddFavicon(GURL("http://google.com"), FAVICON);
EXPECT_NE(id1, 0);
base::Time time = base::Time::Now();
db.SetFavicon(id1, favicon, time);
// Add another type of favicon
- FaviconID id2 = db.AddFavIcon(GURL("http://www.google.com/icon"), TOUCH_ICON);
+ 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);
// Add 3rd favicon
- FaviconID id3 = db.AddFavIcon(GURL("http://www.google.com/icon"), TOUCH_ICON);
+ 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);
diff --git a/chrome/browser/importer/external_process_importer_client.cc b/chrome/browser/importer/external_process_importer_client.cc
index a4ddeee..250b47c 100644
--- a/chrome/browser/importer/external_process_importer_client.cc
+++ b/chrome/browser/importer/external_process_importer_client.cc
@@ -201,7 +201,7 @@ void ExternalProcessImporterClient::OnFavIconsImportStart(
}
void ExternalProcessImporterClient::OnFavIconsImportGroup(
- const std::vector<history::ImportedFavIconUsage>& favicons_group) {
+ const std::vector<history::ImportedFaviconUsage>& favicons_group) {
if (cancelled_)
return;
diff --git a/chrome/browser/importer/external_process_importer_client.h b/chrome/browser/importer/external_process_importer_client.h
index 540cf65..2f1d93e 100644
--- a/chrome/browser/importer/external_process_importer_client.h
+++ b/chrome/browser/importer/external_process_importer_client.h
@@ -19,7 +19,7 @@ class InProcessImporterBridge;
namespace history {
class URLRow;
-struct ImportedFavIconUsage;
+struct ImportedFaviconUsage;
}
namespace importer {
@@ -97,7 +97,7 @@ class ExternalProcessImporterClient
// Called when a group of favicons has been received.
virtual void OnFavIconsImportGroup(
- const std::vector<history::ImportedFavIconUsage>& favicons_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> favicons_;
+ std::vector<history::ImportedFaviconUsage> favicons_;
// Usually some variation on IDS_BOOKMARK_GROUP_...; the name of the folder
// under which imported bookmarks will be placed.
diff --git a/chrome/browser/importer/firefox2_importer.cc b/chrome/browser/importer/firefox2_importer.cc
index d180ea1..bf2f128 100644
--- a/chrome/browser/importer/firefox2_importer.cc
+++ b/chrome/browser/importer/firefox2_importer.cc
@@ -144,7 +144,7 @@ void Firefox2Importer::ImportBookmarksFile(
Importer* importer,
std::vector<ProfileWriter::BookmarkEntry>* bookmarks,
std::vector<TemplateURL*>* template_urls,
- std::vector<history::ImportedFavIconUsage>* favicons) {
+ std::vector<history::ImportedFaviconUsage>* favicons) {
std::string content;
file_util::ReadFileToString(file_path, &content);
std::vector<std::string> lines;
@@ -289,7 +289,7 @@ void Firefox2Importer::ImportBookmarks() {
// Parse the bookmarks.html file.
std::vector<ProfileWriter::BookmarkEntry> bookmarks, toolbar_bookmarks;
std::vector<TemplateURL*> template_urls;
- std::vector<history::ImportedFavIconUsage> favicons;
+ std::vector<history::ImportedFaviconUsage> favicons;
FilePath file = source_path_;
if (!parsing_bookmarks_html_file_)
file = file.AppendASCII("bookmarks.html");
@@ -654,7 +654,7 @@ void Firefox2Importer::FindXMLFilesInDir(
void Firefox2Importer::DataURLToFaviconUsage(
const GURL& link_url,
const GURL& favicon_data,
- std::vector<history::ImportedFavIconUsage>* favicons) {
+ std::vector<history::ImportedFaviconUsage>* favicons) {
if (!link_url.is_valid() || !favicon_data.is_valid() ||
!favicon_data.SchemeIs(chrome::kDataScheme))
return;
@@ -665,7 +665,7 @@ void Firefox2Importer::DataURLToFaviconUsage(
data.empty())
return;
- history::ImportedFavIconUsage usage;
+ history::ImportedFaviconUsage usage;
if (!ReencodeFavicon(reinterpret_cast<const unsigned char*>(&data[0]),
data.size(), &usage.png_data))
return; // Unable to decode.
diff --git a/chrome/browser/importer/firefox2_importer.h b/chrome/browser/importer/firefox2_importer.h
index 253e585..42a9da2 100644
--- a/chrome/browser/importer/firefox2_importer.h
+++ b/chrome/browser/importer/firefox2_importer.h
@@ -51,7 +51,7 @@ class Firefox2Importer : public Importer {
Importer* importer,
std::vector<ProfileWriter::BookmarkEntry>* bookmarks,
std::vector<TemplateURL*>* template_urls,
- std::vector<history::ImportedFavIconUsage>* favicons);
+ std::vector<history::ImportedFaviconUsage>* favicons);
private:
FRIEND_TEST_ALL_PREFIXES(FirefoxImporterTest, Firefox2BookmarkParse);
@@ -136,7 +136,7 @@ class Firefox2Importer : public Importer {
static void DataURLToFaviconUsage(
const GURL& link_url,
const GURL& favicon_data,
- std::vector<history::ImportedFavIconUsage>* favicons);
+ std::vector<history::ImportedFaviconUsage>* favicons);
FilePath source_path_;
FilePath app_path_;
diff --git a/chrome/browser/importer/firefox3_importer.cc b/chrome/browser/importer/firefox3_importer.cc
index 8c5b656..bd5244f 100644
--- a/chrome/browser/importer/firefox3_importer.cc
+++ b/chrome/browser/importer/firefox3_importer.cc
@@ -299,7 +299,7 @@ void Firefox3Importer::ImportBookmarks() {
STLDeleteContainerPointers(template_urls.begin(), template_urls.end());
}
if (!favicon_map.empty() && !cancelled()) {
- std::vector<history::ImportedFavIconUsage> favicons;
+ std::vector<history::ImportedFaviconUsage> favicons;
LoadFavicons(db.get(), favicon_map, &favicons);
bridge_->SetFavicons(favicons);
}
@@ -550,7 +550,7 @@ void Firefox3Importer::GetWholeBookmarkFolder(sqlite3* db, BookmarkList* list,
void Firefox3Importer::LoadFavicons(
sqlite3* db,
const FaviconMap& favicon_map,
- std::vector<history::ImportedFavIconUsage>* favicons) {
+ std::vector<history::ImportedFaviconUsage>* favicons) {
SQLStatement s;
const char* stmt = "SELECT url, data FROM moz_favicons WHERE id=?";
if (s.prepare(db, stmt) != SQLITE_OK)
@@ -560,7 +560,7 @@ void Firefox3Importer::LoadFavicons(
i != favicon_map.end(); ++i) {
s.bind_int64(0, i->first);
if (s.step() == SQLITE_ROW) {
- history::ImportedFavIconUsage usage;
+ history::ImportedFaviconUsage usage;
usage.favicon_url = GURL(s.column_string(0));
if (!usage.favicon_url.is_valid())
diff --git a/chrome/browser/importer/firefox3_importer.h b/chrome/browser/importer/firefox3_importer.h
index fbe2ea5..799ad28 100644
--- a/chrome/browser/importer/firefox3_importer.h
+++ b/chrome/browser/importer/firefox3_importer.h
@@ -70,7 +70,7 @@ class Firefox3Importer : public Importer {
// and converts it into FaviconUsage structures.
void LoadFavicons(sqlite3* db,
const FaviconMap& favicon_map,
- std::vector<history::ImportedFavIconUsage>* favicons);
+ std::vector<history::ImportedFaviconUsage>* favicons);
FilePath source_path_;
FilePath app_path_;
diff --git a/chrome/browser/importer/importer_bridge.cc b/chrome/browser/importer/importer_bridge.cc
index 39b95d5..d68cc16 100644
--- a/chrome/browser/importer/importer_bridge.cc
+++ b/chrome/browser/importer/importer_bridge.cc
@@ -58,7 +58,7 @@ void InProcessImporterBridge::AddIE7PasswordInfo(
#endif // OS_WIN
void InProcessImporterBridge::SetFavicons(
- const std::vector<history::ImportedFavIconUsage>& favicons) {
+ const std::vector<history::ImportedFaviconUsage>& favicons) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
NewRunnableMethod(writer_, &ProfileWriter::AddFavicons, favicons));
@@ -152,7 +152,7 @@ void ExternalProcessImporterBridge::AddIE7PasswordInfo(
#endif
void ExternalProcessImporterBridge::SetFavicons(
- const std::vector<history::ImportedFavIconUsage>& favicons) {
+ const std::vector<history::ImportedFaviconUsage>& favicons) {
profile_import_thread_->NotifyFavIconsImportReady(favicons);
}
diff --git a/chrome/browser/importer/importer_bridge.h b/chrome/browser/importer/importer_bridge.h
index 32f7e1c..d0b980c 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>& favicons) = 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>& favicons);
+ 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>& favicons);
+ 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/importer/importer_host.h b/chrome/browser/importer/importer_host.h
index 9082973..d092d26 100644
--- a/chrome/browser/importer/importer_host.h
+++ b/chrome/browser/importer/importer_host.h
@@ -32,7 +32,7 @@ class TemplateURL;
namespace history {
class URLRow;
-struct ImportedFavIconUsage;
+struct ImportedFaviconUsage;
}
namespace importer {
diff --git a/chrome/browser/importer/importer_messages.h b/chrome/browser/importer/importer_messages.h
index 62cd05b..9c17039 100644
--- a/chrome/browser/importer/importer_messages.h
+++ b/chrome/browser/importer/importer_messages.h
@@ -162,10 +162,10 @@ struct ParamTraits<ProfileWriter::BookmarkEntry> {
}
}; // ParamTraits<ProfileWriter::BookmarkEntry>
-// Traits for history::ImportedFavIconUsage.
+// Traits for history::ImportedFaviconUsage.
template <>
-struct ParamTraits<history::ImportedFavIconUsage> {
- typedef history::ImportedFavIconUsage param_type;
+struct ParamTraits<history::ImportedFaviconUsage> {
+ typedef history::ImportedFaviconUsage param_type;
static void Write(Message* m, const param_type& p) {
WriteParam(m, p.favicon_url);
WriteParam(m, p.png_data);
@@ -186,7 +186,7 @@ struct ParamTraits<history::ImportedFavIconUsage> {
LogParam(p.urls, l);
l->append(")");
}
-}; // ParamTraits<history::ImportedFavIconUsage
+}; // ParamTraits<history::ImportedFaviconUsage
// Traits for TemplateURLRef
template <>
@@ -425,7 +425,7 @@ IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyFavIconsImportStart,
int /* total number of FavIcons */)
IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyFavIconsImportGroup,
- std::vector<history::ImportedFavIconUsage> )
+ std::vector<history::ImportedFaviconUsage> )
IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyPasswordFormReady,
webkit_glue::PasswordForm )
diff --git a/chrome/browser/importer/importer_unittest.cc b/chrome/browser/importer/importer_unittest.cc
index c66f5e2..d5c40e2 100644
--- a/chrome/browser/importer/importer_unittest.cc
+++ b/chrome/browser/importer/importer_unittest.cc
@@ -655,7 +655,7 @@ class FirefoxObserver : public ProfileWriter,
STLDeleteContainerPointers(template_urls.begin(), template_urls.end());
}
- void AddFavicons(const std::vector<history::ImportedFavIconUsage>& favicons) {
+ void AddFavicons(const std::vector<history::ImportedFaviconUsage>& favicons) {
}
private:
@@ -865,7 +865,7 @@ class Firefox3Observer : public ProfileWriter,
STLDeleteContainerPointers(template_urls.begin(), template_urls.end());
}
- void AddFavicons(const std::vector<history::ImportedFavIconUsage>& favicons) {
+ void AddFavicons(const std::vector<history::ImportedFaviconUsage>& favicons) {
}
private:
diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc
index 4d921a5..5bc5f63 100644
--- a/chrome/browser/importer/profile_writer.cc
+++ b/chrome/browser/importer/profile_writer.cc
@@ -152,7 +152,7 @@ void ProfileWriter::AddBookmarkEntry(
}
void ProfileWriter::AddFavicons(
- const std::vector<history::ImportedFavIconUsage>& favicons) {
+ const std::vector<history::ImportedFaviconUsage>& favicons) {
profile_->GetFaviconService(Profile::EXPLICIT_ACCESS)->
SetImportedFavicons(favicons);
}
diff --git a/chrome/browser/importer/profile_writer.h b/chrome/browser/importer/profile_writer.h
index 3002b1a..838c87b 100644
--- a/chrome/browser/importer/profile_writer.h
+++ b/chrome/browser/importer/profile_writer.h
@@ -21,7 +21,7 @@ class TemplateURL;
struct IE7PasswordInfo;
namespace history {
-struct ImportedFavIconUsage;
+struct ImportedFaviconUsage;
class URLRow;
}
@@ -95,7 +95,7 @@ class ProfileWriter : public base::RefCountedThreadSafe<ProfileWriter> {
const std::wstring& first_folder_name,
int options);
virtual void AddFavicons(
- const std::vector<history::ImportedFavIconUsage>& favicons);
+ const std::vector<history::ImportedFaviconUsage>& favicons);
// Add the TemplateURLs in |template_urls| to the local store and make the
// TemplateURL at |default_keyword_index| the default keyword (does not set
// a default keyword if it is -1). The local store becomes the owner of the
diff --git a/chrome/browser/importer/safari_importer.h b/chrome/browser/importer/safari_importer.h
index 84d10d6a..9def59f 100644
--- a/chrome/browser/importer/safari_importer.h
+++ b/chrome/browser/importer/safari_importer.h
@@ -95,7 +95,7 @@ class SafariImporter : public Importer {
// Loads and reencodes the individual favicons.
void LoadFaviconData(sqlite3* db,
const FaviconMap& favicon_map,
- std::vector<history::ImportedFavIconUsage>* favicons);
+ std::vector<history::ImportedFaviconUsage>* favicons);
FilePath library_dir_;
diff --git a/chrome/browser/importer/safari_importer.mm b/chrome/browser/importer/safari_importer.mm
index fa5135f..e5a90d8 100644
--- a/chrome/browser/importer/safari_importer.mm
+++ b/chrome/browser/importer/safari_importer.mm
@@ -118,7 +118,7 @@ void SafariImporter::ImportBookmarks() {
ImportFavIconURLs(db.get(), &favicon_map);
// Write favicons into profile.
if (!favicon_map.empty() && !cancelled()) {
- std::vector<history::ImportedFavIconUsage> favicons;
+ std::vector<history::ImportedFaviconUsage> favicons;
LoadFaviconData(db.get(), favicon_map, &favicons);
bridge_->SetFavicons(favicons);
}
@@ -156,7 +156,7 @@ void SafariImporter::ImportFavIconURLs(sqlite3* db, FaviconMap* favicon_map) {
void SafariImporter::LoadFaviconData(sqlite3* db,
const FaviconMap& favicon_map,
- std::vector<history::ImportedFavIconUsage>* favicons) {
+ std::vector<history::ImportedFaviconUsage>* favicons) {
SQLStatement s;
const char* stmt = "SELECT i.url, d.data "
"FROM IconInfo i JOIN IconData d "
@@ -169,7 +169,7 @@ void SafariImporter::LoadFaviconData(sqlite3* db,
i != favicon_map.end(); ++i) {
s.bind_int64(0, i->first);
if (s.step() == SQLITE_ROW) {
- history::ImportedFavIconUsage usage;
+ history::ImportedFaviconUsage usage;
usage.favicon_url = GURL(s.column_string(0));
if (!usage.favicon_url.is_valid())
diff --git a/chrome/browser/importer/safari_importer_unittest.mm b/chrome/browser/importer/safari_importer_unittest.mm
index 8323517..d8cd209 100644
--- a/chrome/browser/importer/safari_importer_unittest.mm
+++ b/chrome/browser/importer/safari_importer_unittest.mm
@@ -120,13 +120,13 @@ TEST_F(SafariImporterTest, FavIconImport) {
SafariImporter::FaviconMap favicon_map;
importer->ImportFavIconURLs(db.get(), &favicon_map);
- std::vector<history::ImportedFavIconUsage> favicons;
+ std::vector<history::ImportedFaviconUsage> favicons;
importer->LoadFaviconData(db.get(), favicon_map, &favicons);
size_t num_favicons = favicons.size();
ASSERT_EQ(num_favicons, 2U);
- history::ImportedFavIconUsage &fav0 = favicons[0];
+ history::ImportedFaviconUsage &fav0 = favicons[0];
EXPECT_EQ("http://s.ytimg.com/yt/favicon-vfl86270.ico",
fav0.favicon_url.spec());
EXPECT_GT(fav0.png_data.size(), 0U);
@@ -134,7 +134,7 @@ TEST_F(SafariImporterTest, FavIconImport) {
EXPECT_TRUE(fav0.urls.find(GURL("http://www.youtube.com/"))
!= fav0.urls.end());
- history::ImportedFavIconUsage &fav1 = favicons[1];
+ history::ImportedFaviconUsage &fav1 = favicons[1];
EXPECT_EQ("http://www.opensearch.org/favicon.ico",
fav1.favicon_url.spec());
EXPECT_GT(fav1.png_data.size(), 0U);
diff --git a/chrome/browser/profile_import_process_host.h b/chrome/browser/profile_import_process_host.h
index cea7ca5..0d14ec7 100644
--- a/chrome/browser/profile_import_process_host.h
+++ b/chrome/browser/profile_import_process_host.h
@@ -64,7 +64,7 @@ class ProfileImportProcessHost : public BrowserChildProcessHost {
virtual void OnFavIconsImportStart(size_t total_favicons_count) {}
virtual void OnFavIconsImportGroup(
- const std::vector<history::ImportedFavIconUsage>& favicons_group) {}
+ const std::vector<history::ImportedFaviconUsage>& favicons_group) {}
virtual void OnPasswordFormImportReady(
const webkit_glue::PasswordForm& form) {}
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge.mm b/chrome/browser/ui/cocoa/history_menu_bridge.mm
index d82ce6a..7778a34 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge.mm
+++ b/chrome/browser/ui/cocoa/history_menu_bridge.mm
@@ -380,7 +380,7 @@ void HistoryMenuBridge::OnVisitedHistoryResults(
HistoryItem* item = new HistoryItem();
item->title = history_item->GetTitle();
item->url = history_item->GetURL();
- if (history_item->HasFavIcon()) {
+ if (history_item->HasFavicon()) {
const SkBitmap* icon = history_item->GetFavicon();
item->icon.reset([gfx::SkBitmapToNSImage(*icon) retain]);
} else {
diff --git a/chrome/profile_import/profile_import_thread.cc b/chrome/profile_import/profile_import_thread.cc
index a7dd12f..938c52d 100644
--- a/chrome/profile_import/profile_import_thread.cc
+++ b/chrome/profile_import/profile_import_thread.cc
@@ -157,15 +157,15 @@ void ProfileImportThread::NotifyBookmarksImportReady(
}
void ProfileImportThread::NotifyFavIconsImportReady(
- const std::vector<history::ImportedFavIconUsage>& favicons) {
+ const std::vector<history::ImportedFaviconUsage>& favicons) {
Send(new ProfileImportProcessHostMsg_NotifyFavIconsImportStart(
favicons.size()));
- std::vector<history::ImportedFavIconUsage>::const_iterator it;
+ std::vector<history::ImportedFaviconUsage>::const_iterator it;
for (it = favicons.begin(); it < favicons.end();
it = it + kNumFavIconsToSend) {
- std::vector<history::ImportedFavIconUsage> favicons_group;
- std::vector<history::ImportedFavIconUsage>::const_iterator end_group =
+ std::vector<history::ImportedFaviconUsage> favicons_group;
+ std::vector<history::ImportedFaviconUsage>::const_iterator end_group =
std::min(it + kNumFavIconsToSend, favicons.end());
favicons_group.assign(it, end_group);
diff --git a/chrome/profile_import/profile_import_thread.h b/chrome/profile_import/profile_import_thread.h
index c3fd7b0..7d726bd 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>& favicons);
+ 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);