diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-17 04:00:57 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-17 04:00:57 +0000 |
commit | a65175d452e6cb3c9c3599ab4206c42b8ab78bfd (patch) | |
tree | ae69bde6df9080e4e367c23bba9096a1bf302c60 /chrome/browser/translate | |
parent | d9e0c26a9c2850d42c4de6b2f981a8da56497c2c (diff) | |
download | chromium_src-a65175d452e6cb3c9c3599ab4206c42b8ab78bfd.zip chromium_src-a65175d452e6cb3c9c3599ab4206c42b8ab78bfd.tar.gz chromium_src-a65175d452e6cb3c9c3599ab4206c42b8ab78bfd.tar.bz2 |
Remove deprecated wstring DictionaryValue Get{Boolean,Integer,Real,Binary,Dictionary,List}().
BUG=23581
TEST=builds and passes tests
Review URL: http://codereview.chromium.org/3187004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56302 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/translate')
-rw-r--r-- | chrome/browser/translate/translate_prefs.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/chrome/browser/translate/translate_prefs.cc b/chrome/browser/translate/translate_prefs.cc index aa139b0..c815bee 100644 --- a/chrome/browser/translate/translate_prefs.cc +++ b/chrome/browser/translate/translate_prefs.cc @@ -5,7 +5,6 @@ #include "chrome/browser/translate/translate_prefs.h" #include "base/string_util.h" -#include "base/utf_string_conversions.h" #include "chrome/browser/pref_service.h" #include "chrome/browser/scoped_pref_update.h" @@ -79,7 +78,7 @@ void TranslatePrefs::WhitelistLanguagePair( return; } ScopedPrefUpdate update(prefs_, kPrefTranslateWhitelists); - dict->SetString(ASCIIToWide(original_language), target_language); + dict->SetString(original_language, target_language); prefs_->ScheduleSavePersistentPrefs(); } @@ -93,7 +92,7 @@ void TranslatePrefs::RemoveLanguagePairFromWhitelist( return; } ScopedPrefUpdate update(prefs_, kPrefTranslateWhitelists); - if (dict->Remove(ASCIIToWide(original_language), NULL)) + if (dict->Remove(original_language, NULL)) prefs_->ScheduleSavePersistentPrefs(); } @@ -101,7 +100,7 @@ int TranslatePrefs::GetTranslationDeniedCount(const std::string& language) { DictionaryValue* dict = prefs_->GetMutableDictionary(kPrefTranslateDeniedCount); int count = 0; - return dict->GetInteger(UTF8ToWide(language), &count) ? count : 0; + return dict->GetInteger(language, &count) ? count : 0; } void TranslatePrefs::IncrementTranslationDeniedCount( @@ -109,20 +108,20 @@ void TranslatePrefs::IncrementTranslationDeniedCount( DictionaryValue* dict = prefs_->GetMutableDictionary(kPrefTranslateDeniedCount); int count = 0; - dict->GetInteger(UTF8ToWide(language), &count); - dict->SetInteger(UTF8ToWide(language), count + 1); + dict->GetInteger(language, &count); + dict->SetInteger(language, count + 1); } void TranslatePrefs::ResetTranslationDeniedCount(const std::string& language) { prefs_->GetMutableDictionary(kPrefTranslateDeniedCount)-> - SetInteger(UTF8ToWide(language), 0); + SetInteger(language, 0); } int TranslatePrefs::GetTranslationAcceptedCount(const std::string& language) { DictionaryValue* dict = prefs_->GetMutableDictionary(kPrefTranslateAcceptedCount); int count = 0; - return dict->GetInteger(UTF8ToWide(language), &count) ? count : 0; + return dict->GetInteger(language, &count) ? count : 0; } void TranslatePrefs::IncrementTranslationAcceptedCount( @@ -130,14 +129,14 @@ void TranslatePrefs::IncrementTranslationAcceptedCount( DictionaryValue* dict = prefs_->GetMutableDictionary(kPrefTranslateAcceptedCount); int count = 0; - dict->GetInteger(UTF8ToWide(language), &count); - dict->SetInteger(UTF8ToWide(language), count + 1); + dict->GetInteger(language, &count); + dict->SetInteger(language, count + 1); } void TranslatePrefs::ResetTranslationAcceptedCount( const std::string& language) { prefs_->GetMutableDictionary(kPrefTranslateAcceptedCount)-> - SetInteger(UTF8ToWide(language), 0); + SetInteger(language, 0); } // TranslatePrefs: public, static: --------------------------------------------- |