diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-30 04:47:59 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-30 04:47:59 +0000 |
commit | f62137ec7e3403f118893a5e7633360a1a960f67 (patch) | |
tree | d91b7cb6e1b54cc12722bde0e899c473bfe72a84 /chrome/browser | |
parent | 2d5a359ac6ce676191017e8ed4c07d99061e3883 (diff) | |
download | chromium_src-f62137ec7e3403f118893a5e7633360a1a960f67.zip chromium_src-f62137ec7e3403f118893a5e7633360a1a960f67.tar.gz chromium_src-f62137ec7e3403f118893a5e7633360a1a960f67.tar.bz2 |
Fix some signedness issues.
TBR=darin
BUG=33314
TEST=none
Review URL: http://codereview.chromium.org/557069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
4 files changed, 19 insertions, 12 deletions
diff --git a/chrome/browser/host_content_settings_map.cc b/chrome/browser/host_content_settings_map.cc index fcd8d71..602b35c 100644 --- a/chrome/browser/host_content_settings_map.cc +++ b/chrome/browser/host_content_settings_map.cc @@ -21,7 +21,8 @@ const wchar_t* HostContentSettingsMap::kTypeNames[] = { HostContentSettingsMap::HostContentSettingsMap(Profile* profile) : profile_(profile) { - DCHECK(arraysize(kTypeNames) == CONTENT_SETTINGS_NUM_TYPES); + DCHECK_EQ(arraysize(kTypeNames), + static_cast<size_t>(CONTENT_SETTINGS_NUM_TYPES)); const DictionaryValue* default_settings_dictionary = profile_->GetPrefs()->GetDictionary(prefs::kDefaultContentSettings); diff --git a/chrome/browser/views/content_blocked_bubble_contents.cc b/chrome/browser/views/content_blocked_bubble_contents.cc index 8e37497..421f434 100644 --- a/chrome/browser/views/content_blocked_bubble_contents.cc +++ b/chrome/browser/views/content_blocked_bubble_contents.cc @@ -79,7 +79,8 @@ void ContentBlockedBubbleContents::InitControlLayout() { IDS_BLOCKED_PLUGINS_TITLE, IDS_BLOCKED_POPUPS_TITLE, }; - DCHECK_EQ(arraysize(kTitleIDs), CONTENT_SETTINGS_NUM_TYPES); + DCHECK_EQ(arraysize(kTitleIDs), + static_cast<size_t>(CONTENT_SETTINGS_NUM_TYPES)); views::Label* title_label = new views::Label(l10n_util::GetString(kTitleIDs[content_type_])); @@ -112,7 +113,8 @@ void ContentBlockedBubbleContents::InitControlLayout() { IDS_BLOCKED_PLUGINS_UNBLOCK, IDS_BLOCKED_POPUPS_UNBLOCK, }; - DCHECK_EQ(arraysize(kAllowIDs), CONTENT_SETTINGS_NUM_TYPES); + DCHECK_EQ(arraysize(kAllowIDs), + static_cast<size_t>(CONTENT_SETTINGS_NUM_TYPES)); const int radio_button_group = 0; allow_radio_ = new views::RadioButton( l10n_util::GetStringF(kAllowIDs[content_type_], host_), @@ -126,7 +128,8 @@ void ContentBlockedBubbleContents::InitControlLayout() { IDS_BLOCKED_PLUGINS_NO_ACTION, IDS_BLOCKED_POPUPS_NO_ACTION, }; - DCHECK_EQ(arraysize(kAllowIDs), CONTENT_SETTINGS_NUM_TYPES); + DCHECK_EQ(arraysize(kAllowIDs), + static_cast<size_t>(CONTENT_SETTINGS_NUM_TYPES)); block_radio_ = new views::RadioButton( l10n_util::GetString(kBlockIDs[content_type_]), radio_button_group); block_radio_->set_listener(this); @@ -163,7 +166,8 @@ void ContentBlockedBubbleContents::InitControlLayout() { IDS_BLOCKED_PLUGINS_LINK, IDS_BLOCKED_POPUPS_LINK, }; - DCHECK_EQ(arraysize(kLinkIDs), CONTENT_SETTINGS_NUM_TYPES); + DCHECK_EQ(arraysize(kLinkIDs), + static_cast<size_t>(CONTENT_SETTINGS_NUM_TYPES)); manage_link_ = new views::Link(l10n_util::GetString(kLinkIDs[content_type_])); manage_link_->SetController(this); diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc index 446574c..6b67077 100644 --- a/chrome/browser/views/location_bar_view.cc +++ b/chrome/browser/views/location_bar_view.cc @@ -1348,7 +1348,8 @@ LocationBarView::ContentBlockedImageView::ContentBlockedImageView( IDR_BLOCKED_PLUGINS, IDR_BLOCKED_POPUPS, }; - DCHECK_EQ(arraysize(kIconIDs), CONTENT_SETTINGS_NUM_TYPES); + DCHECK_EQ(arraysize(kIconIDs), + static_cast<size_t>(CONTENT_SETTINGS_NUM_TYPES)); ResourceBundle& rb = ResourceBundle::GetSharedInstance(); for (int i = CONTENT_SETTINGS_FIRST_TYPE; i < CONTENT_SETTINGS_NUM_TYPES; ++i) @@ -1363,7 +1364,8 @@ LocationBarView::ContentBlockedImageView::ContentBlockedImageView( IDS_BLOCKED_PLUGINS_TITLE, IDS_BLOCKED_POPUPS_TOOLTIP, }; - DCHECK_EQ(arraysize(kTooltipIDs), CONTENT_SETTINGS_NUM_TYPES); + DCHECK_EQ(arraysize(kTooltipIDs), + static_cast<size_t>(CONTENT_SETTINGS_NUM_TYPES)); SetTooltipText(l10n_util::GetString(kTooltipIDs[content_type_])); } @@ -1383,7 +1385,7 @@ bool LocationBarView::ContentBlockedImageView::OnMousePressed( ContentBlockedBubbleContents* bubble_contents = new ContentBlockedBubbleContents(content_type_, parent_->GetHost(), profile_); - DCHECK(info_bubble_ == NULL); + DCHECK(!info_bubble_); info_bubble_ = InfoBubble::Show(GetWindow(), bounds, bubble_contents, this); bubble_contents->set_info_bubble(info_bubble_); return true; @@ -1542,10 +1544,10 @@ void LocationBarView::PageActionImageView::OnImageLoaded(SkBitmap* image, size_t index) { // We loaded icons()->size() icons, plus one extra if the page action had // a default icon. - int total_icons = page_action_->icon_paths()->size(); + size_t total_icons = page_action_->icon_paths()->size(); if (!page_action_->default_icon_path().empty()) total_icons++; - DCHECK(static_cast<int>(index) < total_icons); + DCHECK(index < total_icons); // Map the index of the loaded image back to its name. If we ever get an // index greater than the number of icons, it must be the default icon. @@ -1557,7 +1559,7 @@ void LocationBarView::PageActionImageView::OnImageLoaded(SkBitmap* image, } // If we are done, release the tracker. - if (static_cast<int>(index) == (total_icons - 1)) + if (index == total_icons - 1) tracker_ = NULL; owner_->UpdatePageActions(); diff --git a/chrome/browser/views/options/content_settings_window_view.cc b/chrome/browser/views/options/content_settings_window_view.cc index 6a941bb..80f129a 100644 --- a/chrome/browser/views/options/content_settings_window_view.cc +++ b/chrome/browser/views/options/content_settings_window_view.cc @@ -166,7 +166,7 @@ void ContentSettingsWindowView::Init() { l10n_util::GetString(IDS_POPUP_TAB_LABEL), popup_page, false); - DCHECK(tabs_->GetTabCount() == CONTENT_SETTINGS_NUM_TYPES); + DCHECK_EQ(tabs_->GetTabCount(), CONTENT_SETTINGS_NUM_TYPES); } void ContentSettingsWindowView::ShowContentSettingsTab( |