summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-16 18:54:05 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-16 18:54:05 +0000
commitf16039d23043cf97048540b3916be44825697f9b (patch)
tree4f607808a77397f26cbca4935b5996abdc188796 /chrome/browser
parentf660caef294d1ad42142b8a500da4ea49af2a4bf (diff)
downloadchromium_src-f16039d23043cf97048540b3916be44825697f9b.zip
chromium_src-f16039d23043cf97048540b3916be44825697f9b.tar.gz
chromium_src-f16039d23043cf97048540b3916be44825697f9b.tar.bz2
fav icon -> favicon. Pass 12/12: all the rest
BUG=76073 TEST=test; no visible change Review URL: http://codereview.chromium.org/6667044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78408 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/bookmarks/bookmark_model.cc6
-rw-r--r--chrome/browser/chromeos/wm_overview_controller.cc4
-rw-r--r--chrome/browser/custom_home_pages_table_model.cc10
-rw-r--r--chrome/browser/custom_home_pages_table_model.h9
-rw-r--r--chrome/browser/extensions/extension_function_dispatcher.cc2
-rw-r--r--chrome/browser/extensions/extension_history_api_constants.cc2
-rw-r--r--chrome/browser/extensions/extension_history_api_constants.h2
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc2
-rw-r--r--chrome/browser/extensions/extension_tabs_module_constants.cc2
-rw-r--r--chrome/browser/extensions/extension_tabs_module_constants.h2
-rw-r--r--chrome/browser/extensions/permissions_apitest.cc6
-rw-r--r--chrome/browser/favicon_helper.cc2
-rw-r--r--chrome/browser/favicon_service.h2
-rw-r--r--chrome/browser/importer/external_process_importer_client.cc4
-rw-r--r--chrome/browser/importer/external_process_importer_client.h4
-rw-r--r--chrome/browser/importer/importer_bridge.cc2
-rw-r--r--chrome/browser/importer/importer_messages.h6
-rw-r--r--chrome/browser/importer/safari_importer.h8
-rw-r--r--chrome/browser/importer/safari_importer.mm8
-rw-r--r--chrome/browser/importer/safari_importer_unittest.mm6
-rw-r--r--chrome/browser/jumplist_win.cc6
-rw-r--r--chrome/browser/jumplist_win.h2
-rw-r--r--chrome/browser/possible_url_model.cc2
-rw-r--r--chrome/browser/possible_url_model.h4
-rw-r--r--chrome/browser/profile_import_process_host.cc8
-rw-r--r--chrome/browser/profile_import_process_host.h4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm14
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm2
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc16
30 files changed, 73 insertions, 78 deletions
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index 230e9d1..da57dff 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -737,7 +737,7 @@ BookmarkNode* BookmarkModel::CreateRootNodeFromStarredEntry(
void BookmarkModel::OnFaviconDataAvailable(
FaviconService::Handle handle,
history::FaviconData favicon) {
- SkBitmap fav_icon;
+ SkBitmap favicon_bitmap;
BookmarkNode* node =
load_consumer_.GetClientData(
profile_->GetFaviconService(Profile::EXPLICIT_ACCESS), handle);
@@ -745,8 +745,8 @@ void BookmarkModel::OnFaviconDataAvailable(
node->set_favicon_load_handle(0);
if (favicon.is_valid() && gfx::PNGCodec::Decode(favicon.image_data->front(),
favicon.image_data->size(),
- &fav_icon)) {
- node->set_favicon(fav_icon);
+ &favicon_bitmap)) {
+ node->set_favicon(favicon_bitmap);
FaviconLoaded(node);
}
}
diff --git a/chrome/browser/chromeos/wm_overview_controller.cc b/chrome/browser/chromeos/wm_overview_controller.cc
index 68538ed..095a9407 100644
--- a/chrome/browser/chromeos/wm_overview_controller.cc
+++ b/chrome/browser/chromeos/wm_overview_controller.cc
@@ -56,7 +56,7 @@ static const double kSnapshotMaxSizeRatio = 0.77;
static const int kTitleHeight = 32;
// The number of additional padding pixels to remove from the title width.
-static const int kFavIconPadding = 5;
+static const int kFaviconPadding = 5;
class BrowserListener : public TabStripModelObserver {
public:
@@ -429,7 +429,7 @@ void BrowserListener::InsertSnapshot(int index) {
node.title = new WmOverviewTitle;
node.title->Init(gfx::Size(std::max(0, cell_size.width() -
WmOverviewFavicon::kIconSize -
- kFavIconPadding),
+ kFaviconPadding),
kTitleHeight), node.snapshot);
node.title->SetTitle(browser_->GetTabContentsAt(index)->GetTitle());
diff --git a/chrome/browser/custom_home_pages_table_model.cc b/chrome/browser/custom_home_pages_table_model.cc
index 1f1a7ebb..36f8a38 100644
--- a/chrome/browser/custom_home_pages_table_model.cc
+++ b/chrome/browser/custom_home_pages_table_model.cc
@@ -59,7 +59,7 @@ void CustomHomePagesTableModel::SetURLs(const std::vector<GURL>& urls) {
entries_[i].url = urls[i];
entries_[i].title.erase();
entries_[i].icon.reset();
- LoadTitleAndFavIcon(&(entries_[i]));
+ LoadTitleAndFavicon(&(entries_[i]));
}
// Complete change, so tell the view to just rebuild itself.
if (observer_)
@@ -70,7 +70,7 @@ void CustomHomePagesTableModel::Add(int index, const GURL& url) {
DCHECK(index >= 0 && index <= RowCount());
entries_.insert(entries_.begin() + static_cast<size_t>(index), Entry());
entries_[index].url = url;
- LoadTitleAndFavIcon(&(entries_[index]));
+ LoadTitleAndFavicon(&(entries_[index]));
if (observer_)
observer_->OnItemsAdded(index, 1);
}
@@ -152,7 +152,7 @@ void CustomHomePagesTableModel::SetObserver(ui::TableModelObserver* observer) {
observer_ = observer;
}
-void CustomHomePagesTableModel::LoadTitleAndFavIcon(Entry* entry) {
+void CustomHomePagesTableModel::LoadTitleAndFavicon(Entry* entry) {
HistoryService* history_service =
profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
if (history_service) {
@@ -165,7 +165,7 @@ void CustomHomePagesTableModel::LoadTitleAndFavIcon(Entry* entry) {
if (favicon_service) {
entry->favicon_handle = favicon_service->GetFaviconForURL(entry->url,
history::FAVICON, &query_consumer_,
- NewCallback(this, &CustomHomePagesTableModel::OnGotFavIcon));
+ NewCallback(this, &CustomHomePagesTableModel::OnGotFavicon));
}
}
@@ -188,7 +188,7 @@ void CustomHomePagesTableModel::OnGotTitle(HistoryService::Handle handle,
}
}
-void CustomHomePagesTableModel::OnGotFavIcon(
+void CustomHomePagesTableModel::OnGotFavicon(
FaviconService::Handle handle,
history::FaviconData favicon) {
int entry_index;
diff --git a/chrome/browser/custom_home_pages_table_model.h b/chrome/browser/custom_home_pages_table_model.h
index 3fd813c..875818e 100644
--- a/chrome/browser/custom_home_pages_table_model.h
+++ b/chrome/browser/custom_home_pages_table_model.h
@@ -59,7 +59,7 @@ class CustomHomePagesTableModel : public ui::TableModel {
struct Entry;
// Loads the title and favicon for the specified entry.
- void LoadTitleAndFavIcon(Entry* entry);
+ void LoadTitleAndFavicon(Entry* entry);
// Callback from history service. Updates the title of the Entry whose
// |title_handle| matches |handle| and notifies the observer of the change.
@@ -70,7 +70,7 @@ class CustomHomePagesTableModel : public ui::TableModel {
// Callback from history service. Updates the icon of the Entry whose
// |favicon_handle| matches |handle| and notifies the observer of the change.
- void OnGotFavIcon(FaviconService::Handle handle,
+ void OnGotFavicon(FaviconService::Handle handle,
history::FaviconData favicon);
// Returns the entry whose |member| matches |handle| and sets |entry_index| to
@@ -79,11 +79,6 @@ class CustomHomePagesTableModel : public ui::TableModel {
CancelableRequestProvider::Handle handle,
int* entry_index);
- // Returns the entry whose |favicon_handle| matches |handle| and sets
- // |entry_index| to the index of the entry.
- Entry* GetEntryByFavIconHandle(FaviconService::Handle handle,
- int* entry_index);
-
// Returns the URL for a particular row, formatted for display to the user.
string16 FormattedURL(int row) const;
diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc
index 943edcf..7cdb2c7 100644
--- a/chrome/browser/extensions/extension_function_dispatcher.cc
+++ b/chrome/browser/extensions/extension_function_dispatcher.cc
@@ -394,7 +394,7 @@ ExtensionFunctionDispatcher::ExtensionFunctionDispatcher(
// If the extension has permission to load chrome://favicon/ resources we need
// to make sure that the FaviconSource is registered with the
// ChromeURLDataManager.
- if (extension->HasHostPermission(GURL(chrome::kChromeUIFavIconURL))) {
+ if (extension->HasHostPermission(GURL(chrome::kChromeUIFaviconURL))) {
FaviconSource* favicon_source = new FaviconSource(profile_);
profile_->GetChromeURLDataManager()->AddDataSource(favicon_source);
}
diff --git a/chrome/browser/extensions/extension_history_api_constants.cc b/chrome/browser/extensions/extension_history_api_constants.cc
index b04b7eb..c5c75b0 100644
--- a/chrome/browser/extensions/extension_history_api_constants.cc
+++ b/chrome/browser/extensions/extension_history_api_constants.cc
@@ -8,7 +8,7 @@ namespace extension_history_api_constants {
const char kAllHistoryKey[] = "allHistory";
const char kEndTimeKey[] = "endTime";
-const char kFavIconUrlKey[] = "favIconUrl";
+const char kFaviconUrlKey[] = "favIconUrl";
const char kIdKey[] = "id";
const char kLastVisitdKey[] = "lastVisitTime";
const char kMaxResultsKey[] = "maxResults";
diff --git a/chrome/browser/extensions/extension_history_api_constants.h b/chrome/browser/extensions/extension_history_api_constants.h
index 6417b9e..74ac859 100644
--- a/chrome/browser/extensions/extension_history_api_constants.h
+++ b/chrome/browser/extensions/extension_history_api_constants.h
@@ -13,7 +13,7 @@ namespace extension_history_api_constants {
// Keys.
extern const char kAllHistoryKey[];
extern const char kEndTimeKey[];
-extern const char kFavIconUrlKey[];
+extern const char kFaviconUrlKey[];
extern const char kIdKey[];
extern const char kLastVisitdKey[];
extern const char kMaxResultsKey[];
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index a66e300..5b062d3 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -136,7 +136,7 @@ DictionaryValue* ExtensionTabUtil::CreateTabValue(
NavigationEntry* entry = contents->controller().GetActiveEntry();
if (entry) {
if (entry->favicon().is_valid())
- result->SetString(keys::kFavIconUrlKey, entry->favicon().url().spec());
+ result->SetString(keys::kFaviconUrlKey, entry->favicon().url().spec());
}
}
diff --git a/chrome/browser/extensions/extension_tabs_module_constants.cc b/chrome/browser/extensions/extension_tabs_module_constants.cc
index f23edae..bde76c5 100644
--- a/chrome/browser/extensions/extension_tabs_module_constants.cc
+++ b/chrome/browser/extensions/extension_tabs_module_constants.cc
@@ -8,7 +8,7 @@ namespace extension_tabs_module_constants {
const char kAllFramesKey[] = "allFrames";
const char kCodeKey[] = "code";
-const char kFavIconUrlKey[] = "favIconUrl";
+const char kFaviconUrlKey[] = "favIconUrl";
const char kFileKey[] = "file";
const char kFocusedKey[] = "focused";
const char kFormatKey[] = "format";
diff --git a/chrome/browser/extensions/extension_tabs_module_constants.h b/chrome/browser/extensions/extension_tabs_module_constants.h
index 231dbb8..1a979ae 100644
--- a/chrome/browser/extensions/extension_tabs_module_constants.h
+++ b/chrome/browser/extensions/extension_tabs_module_constants.h
@@ -13,7 +13,7 @@ namespace extension_tabs_module_constants {
// Keys used in serializing tab data & events.
extern const char kAllFramesKey[];
extern const char kCodeKey[];
-extern const char kFavIconUrlKey[];
+extern const char kFaviconUrlKey[];
extern const char kFileKey[];
extern const char kFocusedKey[];
extern const char kFormatKey[];
diff --git a/chrome/browser/extensions/permissions_apitest.cc b/chrome/browser/extensions/permissions_apitest.cc
index 33adfe2..e298a093 100644
--- a/chrome/browser/extensions/permissions_apitest.cc
+++ b/chrome/browser/extensions/permissions_apitest.cc
@@ -17,7 +17,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, PermissionsFail) {
ASSERT_TRUE(RunExtensionTest("permissions/disabled")) << message_;
// Since the experimental APIs require a flag, this will fail even though
- // It's enabled.
+ // it's enabled.
// TODO(erikkay) This test is currently broken because LoadExtension in
// ExtensionBrowserTest doesn't actually fail, it just times out. To fix this
// I'll need to add an EXTENSION_LOAD_ERROR notification, which is probably
@@ -38,12 +38,12 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ExperimentalPermissionsFail) {
<< message_;
}
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FavIconPermission) {
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FaviconPermission) {
ASSERT_TRUE(RunExtensionTest("permissions/favicon")) << message_;
}
// Test functions and APIs that are always allowed (even if you ask for no
-// permissions.
+// permissions).
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, AlwaysAllowed) {
ASSERT_TRUE(RunExtensionTest("permissions/always_allowed")) << message_;
}
diff --git a/chrome/browser/favicon_helper.cc b/chrome/browser/favicon_helper.cc
index 6ff45ea..7ad421c 100644
--- a/chrome/browser/favicon_helper.cc
+++ b/chrome/browser/favicon_helper.cc
@@ -207,7 +207,7 @@ void FaviconHelper::OnFaviconDataForInitialURL(
if (favicon.known_icon && !favicon.expired) {
if (got_favicon_url_ && entry->favicon().url() != favicon.icon_url) {
- // Mapping in the database is wrong. DownloadFavIconOrAskHistory will
+ // 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);
diff --git a/chrome/browser/favicon_service.h b/chrome/browser/favicon_service.h
index 8dc6500..b7c9259 100644
--- a/chrome/browser/favicon_service.h
+++ b/chrome/browser/favicon_service.h
@@ -65,7 +65,7 @@ class FaviconService : public CancelableRequestProvider,
// Requests any |icon_types| of favicon for a web page URL. |consumer| is
// notified when the bits have been fetched. |icon_types| can be any
// combination of IconType value, but only one icon will be returned in the
- // priority of TOUCH_PRECOMPOSED_ICON, TOUCH_ICON and FAV_ICON.
+ // priority of TOUCH_PRECOMPOSED_ICON, TOUCH_ICON and FAVICON.
//
// Note: this version is intended to be used to retrieve the favicon of a
// page that has been browsed in the past. |expired| in the callback is
diff --git a/chrome/browser/importer/external_process_importer_client.cc b/chrome/browser/importer/external_process_importer_client.cc
index 250b47c..5e341b8 100644
--- a/chrome/browser/importer/external_process_importer_client.cc
+++ b/chrome/browser/importer/external_process_importer_client.cc
@@ -191,7 +191,7 @@ void ExternalProcessImporterClient::OnBookmarksImportGroup(
}
}
-void ExternalProcessImporterClient::OnFavIconsImportStart(
+void ExternalProcessImporterClient::OnFaviconsImportStart(
size_t total_favicons_count) {
if (cancelled_)
return;
@@ -200,7 +200,7 @@ void ExternalProcessImporterClient::OnFavIconsImportStart(
favicons_.reserve(total_favicons_count);
}
-void ExternalProcessImporterClient::OnFavIconsImportGroup(
+void ExternalProcessImporterClient::OnFaviconsImportGroup(
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 2f1d93e..d432303 100644
--- a/chrome/browser/importer/external_process_importer_client.h
+++ b/chrome/browser/importer/external_process_importer_client.h
@@ -93,10 +93,10 @@ class ExternalProcessImporterClient
// First message received when importing favicons. |total_favicons_size|
// gives the total number of favicons to be imported.
- virtual void OnFavIconsImportStart(size_t total_favicons_count) OVERRIDE;
+ virtual void OnFaviconsImportStart(size_t total_favicons_count) OVERRIDE;
// Called when a group of favicons has been received.
- virtual void OnFavIconsImportGroup(
+ virtual void OnFaviconsImportGroup(
const std::vector<history::ImportedFaviconUsage>& favicons_group)
OVERRIDE;
diff --git a/chrome/browser/importer/importer_bridge.cc b/chrome/browser/importer/importer_bridge.cc
index d68cc16..07b5dd2 100644
--- a/chrome/browser/importer/importer_bridge.cc
+++ b/chrome/browser/importer/importer_bridge.cc
@@ -153,7 +153,7 @@ void ExternalProcessImporterBridge::AddIE7PasswordInfo(
void ExternalProcessImporterBridge::SetFavicons(
const std::vector<history::ImportedFaviconUsage>& favicons) {
- profile_import_thread_->NotifyFavIconsImportReady(favicons);
+ profile_import_thread_->NotifyFaviconsImportReady(favicons);
}
void ExternalProcessImporterBridge::SetHistoryItems(
diff --git a/chrome/browser/importer/importer_messages.h b/chrome/browser/importer/importer_messages.h
index 9c17039..4a89d4d 100644
--- a/chrome/browser/importer/importer_messages.h
+++ b/chrome/browser/importer/importer_messages.h
@@ -421,10 +421,10 @@ IPC_MESSAGE_CONTROL3(ProfileImportProcessHostMsg_NotifyBookmarksImportStart,
IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyBookmarksImportGroup,
std::vector<ProfileWriter::BookmarkEntry>)
-IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyFavIconsImportStart,
- int /* total number of FavIcons */)
+IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyFaviconsImportStart,
+ int /* total number of favicons */)
-IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyFavIconsImportGroup,
+IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyFaviconsImportGroup,
std::vector<history::ImportedFaviconUsage> )
IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyPasswordFormReady,
diff --git a/chrome/browser/importer/safari_importer.h b/chrome/browser/importer/safari_importer.h
index 9def59f..91d79604 100644
--- a/chrome/browser/importer/safari_importer.h
+++ b/chrome/browser/importer/safari_importer.h
@@ -50,12 +50,12 @@ class SafariImporter : public Importer {
static bool CanImport(const FilePath& library_dir, uint16 *services_supported);
private:
FRIEND_TEST_ALL_PREFIXES(SafariImporterTest, BookmarkImport);
- FRIEND_TEST_ALL_PREFIXES(SafariImporterTest, FavIconImport);
+ FRIEND_TEST_ALL_PREFIXES(SafariImporterTest, FaviconImport);
FRIEND_TEST_ALL_PREFIXES(SafariImporterTest, HistoryImport);
virtual ~SafariImporter();
- // Multiple URLs can share the same FavIcon, this is a map
+ // Multiple URLs can share the same favicon; this is a map
// of URLs -> IconIDs that we load as a temporary step before
// actually loading the icons.
typedef std::map<int64, std::set<GURL> > FaviconMap;
@@ -87,10 +87,10 @@ class SafariImporter : public Importer {
void ParseHistoryItems(std::vector<history::URLRow>* history_items);
// Loads the favicon Database file, returns NULL on failure.
- sqlite3* OpenFavIconDB();
+ sqlite3* OpenFaviconDB();
// Loads the urls associated with the favicons into favicon_map;
- void ImportFavIconURLs(sqlite3* db, FaviconMap* favicon_map);
+ void ImportFaviconURLs(sqlite3* db, FaviconMap* favicon_map);
// Loads and reencodes the individual favicons.
void LoadFaviconData(sqlite3* db,
diff --git a/chrome/browser/importer/safari_importer.mm b/chrome/browser/importer/safari_importer.mm
index e5a90d8..2919ead 100644
--- a/chrome/browser/importer/safari_importer.mm
+++ b/chrome/browser/importer/safari_importer.mm
@@ -113,9 +113,9 @@ void SafariImporter::ImportBookmarks() {
}
// Import favicons.
- sqlite_utils::scoped_sqlite_db_ptr db(OpenFavIconDB());
+ sqlite_utils::scoped_sqlite_db_ptr db(OpenFaviconDB());
FaviconMap favicon_map;
- ImportFavIconURLs(db.get(), &favicon_map);
+ ImportFaviconURLs(db.get(), &favicon_map);
// Write favicons into profile.
if (!favicon_map.empty() && !cancelled()) {
std::vector<history::ImportedFaviconUsage> favicons;
@@ -124,7 +124,7 @@ void SafariImporter::ImportBookmarks() {
}
}
-sqlite3* SafariImporter::OpenFavIconDB() {
+sqlite3* SafariImporter::OpenFaviconDB() {
// Construct ~/Library/Safari/WebIcons.db path
NSString* library_dir = [NSString
stringWithUTF8String:library_dir_.value().c_str()];
@@ -141,7 +141,7 @@ sqlite3* SafariImporter::OpenFavIconDB() {
return favicons_db;
}
-void SafariImporter::ImportFavIconURLs(sqlite3* db, FaviconMap* favicon_map) {
+void SafariImporter::ImportFaviconURLs(sqlite3* db, FaviconMap* favicon_map) {
SQLStatement s;
const char* stmt = "SELECT iconID, url FROM PageURL;";
if (s.prepare(db, stmt) != SQLITE_OK)
diff --git a/chrome/browser/importer/safari_importer_unittest.mm b/chrome/browser/importer/safari_importer_unittest.mm
index d8cd209..789f45b 100644
--- a/chrome/browser/importer/safari_importer_unittest.mm
+++ b/chrome/browser/importer/safari_importer_unittest.mm
@@ -112,13 +112,13 @@ TEST_F(SafariImporterTest, BookmarkImport) {
}
}
-TEST_F(SafariImporterTest, FavIconImport) {
+TEST_F(SafariImporterTest, FaviconImport) {
scoped_refptr<SafariImporter> importer(GetSafariImporter());
- sqlite_utils::scoped_sqlite_db_ptr db(importer->OpenFavIconDB());
+ sqlite_utils::scoped_sqlite_db_ptr db(importer->OpenFaviconDB());
ASSERT_TRUE(db.get() != NULL);
SafariImporter::FaviconMap favicon_map;
- importer->ImportFavIconURLs(db.get(), &favicon_map);
+ importer->ImportFaviconURLs(db.get(), &favicon_map);
std::vector<history::ImportedFaviconUsage> favicons;
importer->LoadFaviconData(db.get(), favicon_map, &favicons);
diff --git a/chrome/browser/jumplist_win.cc b/chrome/browser/jumplist_win.cc
index 55e9f44..f57d839 100644
--- a/chrome/browser/jumplist_win.cc
+++ b/chrome/browser/jumplist_win.cc
@@ -678,7 +678,7 @@ bool JumpList::AddWindow(const TabRestoreService::Window* window,
return true;
}
-bool JumpList::StartLoadingFavIcon() {
+bool JumpList::StartLoadingFavicon() {
if (icon_urls_.empty())
return false;
@@ -748,7 +748,7 @@ void JumpList::OnSegmentUsageAvailable(
}
// Send a query that retrieves the first favicon.
- StartLoadingFavIcon();
+ StartLoadingFavicon();
}
void JumpList::OnFaviconDataAvailable(
@@ -764,7 +764,7 @@ void JumpList::OnFaviconDataAvailable(
// if we need to load more favicons, we send another query and exit.
if (!icon_urls_.empty())
icon_urls_.pop_front();
- if (StartLoadingFavIcon())
+ if (StartLoadingFavicon())
return;
// Finished loading all favicons needed by the application JumpList.
diff --git a/chrome/browser/jumplist_win.h b/chrome/browser/jumplist_win.h
index 6d9c9d1..56c1964 100644
--- a/chrome/browser/jumplist_win.h
+++ b/chrome/browser/jumplist_win.h
@@ -144,7 +144,7 @@ class JumpList : public TabRestoreServiceObserver {
// Starts loading a favicon for each URL in |icon_urls_|.
// This function just sends a query to HistoryService.
- bool StartLoadingFavIcon();
+ bool StartLoadingFavicon();
// A callback function for HistoryService that notify when the "Most Visited"
// list is available.
diff --git a/chrome/browser/possible_url_model.cc b/chrome/browser/possible_url_model.cc
index c7a75a8..2d30c51 100644
--- a/chrome/browser/possible_url_model.cc
+++ b/chrome/browser/possible_url_model.cc
@@ -152,7 +152,7 @@ SkBitmap PossibleURLModel::GetIcon(int row) {
}
Result& result = results_[row];
- FavIconMap::iterator i = favicon_map_.find(result.index);
+ FaviconMap::iterator i = favicon_map_.find(result.index);
if (i != favicon_map_.end()) {
// We already requested the favicon, return it.
if (!i->second.isNull())
diff --git a/chrome/browser/possible_url_model.h b/chrome/browser/possible_url_model.h
index ab34d1c..f2624d7 100644
--- a/chrome/browser/possible_url_model.h
+++ b/chrome/browser/possible_url_model.h
@@ -61,8 +61,8 @@ class PossibleURLModel : public ui::TableModel {
std::vector<Result> results_;
// Map Result::index -> Favicon.
- typedef std::map<size_t, SkBitmap> FavIconMap;
- FavIconMap favicon_map_;
+ typedef std::map<size_t, SkBitmap> FaviconMap;
+ FaviconMap favicon_map_;
DISALLOW_COPY_AND_ASSIGN(PossibleURLModel);
};
diff --git a/chrome/browser/profile_import_process_host.cc b/chrome/browser/profile_import_process_host.cc
index b2bfb26..37fca53 100644
--- a/chrome/browser/profile_import_process_host.cc
+++ b/chrome/browser/profile_import_process_host.cc
@@ -170,10 +170,10 @@ bool ProfileImportProcessHost::ImportProcessClient::OnMessageReceived(
ImportProcessClient::OnBookmarksImportStart)
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyBookmarksImportGroup,
ImportProcessClient::OnBookmarksImportGroup)
- IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFavIconsImportStart,
- ImportProcessClient::OnFavIconsImportStart)
- IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFavIconsImportGroup,
- ImportProcessClient::OnFavIconsImportGroup)
+ IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFaviconsImportStart,
+ ImportProcessClient::OnFaviconsImportStart)
+ IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFaviconsImportGroup,
+ ImportProcessClient::OnFaviconsImportGroup)
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyPasswordFormReady,
ImportProcessClient::OnPasswordFormImportReady)
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyKeywordsReady,
diff --git a/chrome/browser/profile_import_process_host.h b/chrome/browser/profile_import_process_host.h
index 0d14ec7..af714e0 100644
--- a/chrome/browser/profile_import_process_host.h
+++ b/chrome/browser/profile_import_process_host.h
@@ -62,8 +62,8 @@ class ProfileImportProcessHost : public BrowserChildProcessHost {
virtual void OnBookmarksImportGroup(
const std::vector<ProfileWriter::BookmarkEntry>& bookmarks) {}
- virtual void OnFavIconsImportStart(size_t total_favicons_count) {}
- virtual void OnFavIconsImportGroup(
+ virtual void OnFaviconsImportStart(size_t total_favicons_count) {}
+ virtual void OnFaviconsImportGroup(
const std::vector<history::ImportedFaviconUsage>& favicons_group) {}
virtual void OnPasswordFormImportReady(
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h
index f17ee23..a2e3dac 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h
@@ -305,8 +305,8 @@ willAnimateFromState:(bookmarks::VisualState)oldState
// Import bookmarks from another browser.
- (IBAction)importBookmarks:(id)sender;
-// Provide a favIcon for a bookmark node. May return nil.
-- (NSImage*)favIconForNode:(const BookmarkNode*)node;
+// Provide a favicon for a bookmark node. May return nil.
+- (NSImage*)faviconForNode:(const BookmarkNode*)node;
// Used for situations where the bookmark bar folder menus should no longer
// be actively popping up. Called when the window loses focus, a click has
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index 19bd58d..d9eba43 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -502,16 +502,16 @@ void RecordAppLaunch(Profile* profile, GURL url) {
return [self isInState:bookmarks::kShowingState] ? 0 : 1;
}
-- (NSImage*)favIconForNode:(const BookmarkNode*)node {
+- (NSImage*)faviconForNode:(const BookmarkNode*)node {
if (!node)
return defaultImage_;
if (node->is_folder())
return folderImage_;
- const SkBitmap& favIcon = bookmarkModel_->GetFavicon(node);
- if (!favIcon.isNull())
- return gfx::SkBitmapToNSImage(favIcon);
+ const SkBitmap& favicon = bookmarkModel_->GetFavicon(node);
+ if (!favicon.isNull())
+ return gfx::SkBitmapToNSImage(favicon);
return defaultImage_;
}
@@ -1004,7 +1004,7 @@ void RecordAppLaunch(Profile* profile, GURL url) {
action:nil
keyEquivalent:@""] autorelease];
[menu addItem:item];
- [item setImage:[self favIconForNode:child]];
+ [item setImage:[self faviconForNode:child]];
if (child->is_folder()) {
NSMenu* submenu = [[[NSMenu alloc] initWithTitle:title] autorelease];
[menu setSubmenu:submenu forItem:item];
@@ -1508,7 +1508,7 @@ void RecordAppLaunch(Profile* profile, GURL url) {
// Return an autoreleased NSCell suitable for a bookmark button.
// TODO(jrg): move much of the cell config into the BookmarkButtonCell class.
- (BookmarkButtonCell*)cellForBookmarkNode:(const BookmarkNode*)node {
- NSImage* image = node ? [self favIconForNode:node] : nil;
+ NSImage* image = node ? [self faviconForNode:node] : nil;
NSMenu* menu = node && node->is_folder() ? buttonFolderContextMenu_ :
buttonContextMenu_;
BookmarkButtonCell* cell = [BookmarkButtonCell buttonCellForNode:node
@@ -1917,7 +1917,7 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
const BookmarkNode* cellnode = [button bookmarkNode];
if (cellnode == node) {
[[button cell] setBookmarkCellText:[button title]
- image:[self favIconForNode:node]];
+ image:[self faviconForNode:node]];
// Adding an image means we might need more room for the
// bookmark. Test for it by growing the button (if needed)
// and shifting everything else over.
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
index 4436406..53e135a 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
@@ -327,7 +327,7 @@ struct LayoutMetrics {
#pragma mark Private Methods
- (BookmarkButtonCell*)cellForBookmarkNode:(const BookmarkNode*)child {
- NSImage* image = child ? [barController_ favIconForNode:child] : nil;
+ NSImage* image = child ? [barController_ faviconForNode:child] : nil;
NSMenu* menu = child ? child->is_folder() ? folderMenu_ : buttonMenu_ : nil;
BookmarkBarFolderButtonCell* cell =
[BookmarkBarFolderButtonCell buttonCellForNode:child
diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
index 122174a..18f0867 100644
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
@@ -845,10 +845,10 @@ void TabRendererGtk::PaintIcon(gfx::Canvas* canvas) {
} else {
// If the favicon is an app icon, it is allowed to be drawn slightly
// larger than the standard favicon.
- int favIconHeightOffset = data_.app ? -2 : 0;
- int favIconWidthDelta = data_.app ?
+ int faviconHeightOffset = data_.app ? -2 : 0;
+ int faviconWidthDelta = data_.app ?
data_.favicon.width() - kFaviconSize : 0;
- int favIconHeightDelta = data_.app ?
+ int faviconHeightDelta = data_.app ?
data_.favicon.height() - kFaviconSize : 0;
// TODO(pkasting): Use code in tab_icon_view.cc:PaintIcon() (or switch
@@ -856,12 +856,12 @@ void TabRendererGtk::PaintIcon(gfx::Canvas* canvas) {
canvas->DrawBitmapInt(data_.favicon, 0, 0,
data_.favicon.width(),
data_.favicon.height(),
- favicon_bounds_.x() - favIconWidthDelta/2,
- favicon_bounds_.y() + favIconHeightOffset
- - favIconHeightDelta/2
+ favicon_bounds_.x() - faviconWidthDelta/2,
+ favicon_bounds_.y() + faviconHeightOffset
+ - faviconHeightDelta/2
+ favicon_hiding_offset_,
- kFaviconSize + favIconWidthDelta,
- kFaviconSize + favIconHeightDelta,
+ kFaviconSize + faviconWidthDelta,
+ kFaviconSize + faviconHeightDelta,
true);
}
}