Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: chrome/browser/extensions/extension_tts_api.cc

Issue 6901084: Use new APIs in base/values.h: Value::GetAsNumber and DictionaryValue::GetNumber. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, 2010->2011 Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_tts_api.cc
diff --git a/chrome/browser/extensions/extension_tts_api.cc b/chrome/browser/extensions/extension_tts_api.cc
index 997f080c4da755e1b9b7db858339fef81e328d20..478175117e5a255fcefb197ffde8b1e68bd87549 100644
--- a/chrome/browser/extensions/extension_tts_api.cc
+++ b/chrome/browser/extensions/extension_tts_api.cc
@@ -79,17 +79,17 @@ Utterance::Utterance(Profile* profile,
if (options->HasKey(util::kGenderKey))
options->GetString(util::kGenderKey, &gender_);
- if (util::ReadNumberByKey(options, util::kRateKey, &rate_)) {
+ if (options->GetDouble(util::kRateKey, &rate_)) {
if (!base::IsFinite(rate_) || rate_ < 0.0 || rate_ > 1.0)
rate_ = -1.0;
}
- if (util::ReadNumberByKey(options, util::kPitchKey, &pitch_)) {
+ if (options->GetDouble(util::kPitchKey, &pitch_)) {
if (!base::IsFinite(pitch_) || pitch_ < 0.0 || pitch_ > 1.0)
pitch_ = -1.0;
}
- if (util::ReadNumberByKey(options, util::kVolumeKey, &volume_)) {
+ if (options->GetDouble(util::kVolumeKey, &volume_)) {
if (!base::IsFinite(volume_) || volume_ < 0.0 || volume_ > 1.0)
volume_ = -1.0;
}
« no previous file with comments | « chrome/browser/extensions/extension_history_api.cc ('k') | chrome/browser/extensions/extension_tts_api_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698