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

Unified Diff: chrome/browser/extensions/extension_tts_api_util.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
« no previous file with comments | « chrome/browser/extensions/extension_tts_api_util.h ('k') | chrome/browser/printing/print_dialog_cloud.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 b63038739de6eea566a3e2fe5d402d796206f676..8884966ec1a27a1b1a2045e0dbfab70a28a77bd4 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.
« no previous file with comments | « chrome/browser/extensions/extension_tts_api_util.h ('k') | chrome/browser/printing/print_dialog_cloud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698