From 25e27589e68568be1e61a215862054ad40e0e95e Mon Sep 17 00:00:00 2001 From: msramek Date: Fri, 29 May 2015 10:34:59 -0700 Subject: Fix shadowing variables in ContentSettingsPrefProvider. BUG=427616 Review URL: https://codereview.chromium.org/1101713004 Cr-Commit-Position: refs/heads/master@{#332002} --- .../core/browser/content_settings_pref_provider.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'components/content_settings') diff --git a/components/content_settings/core/browser/content_settings_pref_provider.cc b/components/content_settings/core/browser/content_settings_pref_provider.cc index 2319578..938eaa1 100644 --- a/components/content_settings/core/browser/content_settings_pref_provider.cc +++ b/components/content_settings/core/browser/content_settings_pref_provider.cc @@ -404,8 +404,8 @@ void PrefProvider::ReadContentSettingsFromOldPref() { bool is_dictionary = i.value().GetAsDictionary(&settings_dictionary); DCHECK(is_dictionary); - for (size_t i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { - ContentSettingsType content_type = static_cast(i); + for (size_t k = 0; k < CONTENT_SETTINGS_NUM_TYPES; ++k) { + ContentSettingsType content_type = static_cast(k); std::string res_dictionary_path; if (GetResourceTypeName(content_type, &res_dictionary_path)) { @@ -435,14 +435,14 @@ void PrefProvider::ReadContentSettingsFromOldPref() { const base::DictionaryValue* setting = NULL; // TODO(xians): Handle the non-dictionary types. if (settings_dictionary->GetDictionaryWithoutPathExpansion( - GetTypeName(ContentSettingsType(i)), &setting)) { + GetTypeName(content_type), &setting)) { DCHECK(!setting->empty()); value = setting->DeepCopy(); } } else { int setting = CONTENT_SETTING_DEFAULT; if (settings_dictionary->GetIntegerWithoutPathExpansion( - GetTypeName(ContentSettingsType(i)), &setting)) { + GetTypeName(content_type), &setting)) { DCHECK_NE(CONTENT_SETTING_DEFAULT, setting); setting = FixObsoleteCookiePromptMode(content_type, ContentSetting(setting)); -- cgit v1.1