From 05c7da698dc0aa33c4a116dacfcadc90702cf83b Mon Sep 17 00:00:00 2001 From: "yusukes@google.com" Date: Thu, 5 May 2011 17:23:56 +0000 Subject: Remove Value::GetAsInteger() calls. Since r83705, Value::GetAsDouble() can return an integer value as double. We no longer need to call Value::GetAsInteger() explicitly. BUG=None TEST=ran try Review URL: http://codereview.chromium.org/6901084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84263 0039d316-1c4b-4281-b951-d872f2087c98 --- .../browser/extensions/extension_tts_api_util.cc | 24 +--------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'chrome/browser/extensions/extension_tts_api_util.cc') diff --git a/chrome/browser/extensions/extension_tts_api_util.cc b/chrome/browser/extensions/extension_tts_api_util.cc index b630387..8884966 100644 --- a/chrome/browser/extensions/extension_tts_api_util.cc +++ b/chrome/browser/extensions/extension_tts_api_util.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -14,26 +14,4 @@ const char kPitchKey[] = "pitch"; const char kVolumeKey[] = "volume"; const char kEnqueueKey[] = "enqueue"; -// Static. -bool ReadNumberByKey(DictionaryValue* dict, - const char* key, - double* ret_value) { - Value* value; - if (!dict->Get(key, &value)) - return false; - - if (value->IsType(Value::TYPE_INTEGER)) { - int int_value; - if (!dict->GetInteger(key, &int_value)) - return false; - *ret_value = int_value; - } else if (value->IsType(Value::TYPE_DOUBLE)) { - if (!dict->GetDouble(key, ret_value)) - return false; - } else { - return false; - } - return true; -} - } // namespace extension_tts_api_util. -- cgit v1.1