| 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 83f94e51f1fe48415fd4d97fa6665fdbfedc19e7..64c2fea782080f70ad6dc44cccf33939b2d19428 100644
|
| --- a/chrome/browser/printing/print_dialog_cloud.cc
|
| +++ b/chrome/browser/printing/print_dialog_cloud.cc
|
| @@ -99,18 +99,6 @@
|
|
|
| namespace internal_cloud_print_helpers {
|
|
|
| -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;
|
| - *out_value = int_value;
|
| - }
|
| - return true;
|
| -}
|
| -
|
| // From the JSON parsed value, get the entries for the page setup
|
| // parameters.
|
| bool GetPageSetupParameters(const std::string& json,
|
| @@ -124,9 +112,9 @@ bool GetPageSetupParameters(const std::string& json,
|
|
|
| bool result = true;
|
| DictionaryValue* params = static_cast<DictionaryValue*>(parsed_value.get());
|
| - result &= GetDoubleOrInt(*params, "dpi", ¶meters.dpi);
|
| - result &= GetDoubleOrInt(*params, "min_shrink", ¶meters.min_shrink);
|
| - result &= GetDoubleOrInt(*params, "max_shrink", ¶meters.max_shrink);
|
| + result &= params->GetDouble("dpi", ¶meters.dpi);
|
| + result &= params->GetDouble("min_shrink", ¶meters.min_shrink);
|
| + result &= params->GetDouble("max_shrink", ¶meters.max_shrink);
|
| result &= params->GetBoolean("selection_only", ¶meters.selection_only);
|
| return result;
|
| }
|
|
|