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

Unified Diff: chrome/browser/printing/print_dialog_cloud.cc

Issue 6248026: Rename Real* to Double* in values.* and dependent files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More renames Created 9 years, 11 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/printing/print_dialog_cloud.cc
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index f2fccf4a34158c48d772636eb6cda6125ec0fd83..209ad6af0e4b28d0536985d49b593f8012040ec2 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -106,10 +106,10 @@
namespace internal_cloud_print_helpers {
-bool GetRealOrInt(const DictionaryValue& dictionary,
- const std::string& path,
- double* out_value) {
- if (!dictionary.GetReal(path, out_value)) {
+bool GetDoubleOrInt(const DictionaryValue& dictionary,
+ const std::string& path,
+ double* out_value) {
+ if (!dictionary.GetDouble(path, out_value)) {
int int_value = 0;
if (!dictionary.GetInteger(path, &int_value))
return false;
@@ -131,9 +131,9 @@ bool GetPageSetupParameters(const std::string& json,
bool result = true;
DictionaryValue* params = static_cast<DictionaryValue*>(parsed_value.get());
- result &= GetRealOrInt(*params, "dpi", &parameters.dpi);
- result &= GetRealOrInt(*params, "min_shrink", &parameters.min_shrink);
- result &= GetRealOrInt(*params, "max_shrink", &parameters.max_shrink);
+ result &= GetDoubleOrInt(*params, "dpi", &parameters.dpi);
+ result &= GetDoubleOrInt(*params, "min_shrink", &parameters.min_shrink);
+ result &= GetDoubleOrInt(*params, "max_shrink", &parameters.max_shrink);
result &= params->GetBoolean("selection_only", &parameters.selection_only);
return result;
}

Powered by Google App Engine
This is Rietveld 408576698