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

Unified Diff: chrome/browser/extensions/api/settings_private/settings_private_delegate.cc

Issue 2409753003: MD Settings: chrome.settingsPrivate, fix rounding error. (Closed)
Patch Set: No diff Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/settings_private/settings_private_delegate.cc
diff --git a/chrome/browser/extensions/api/settings_private/settings_private_delegate.cc b/chrome/browser/extensions/api/settings_private/settings_private_delegate.cc
index 1b5f72ea522978baa00ccf188be21ef4015ed9a8..4e8b6f5a5db5123407afa31e03bd1f7c47015d09 100644
--- a/chrome/browser/extensions/api/settings_private/settings_private_delegate.cc
+++ b/chrome/browser/extensions/api/settings_private/settings_private_delegate.cc
@@ -61,7 +61,8 @@ PrefsUtil::SetPrefResult SettingsPrivateDelegate::SetPref(
std::unique_ptr<base::Value> SettingsPrivateDelegate::GetDefaultZoomPercent() {
double zoom = content::ZoomLevelToZoomFactor(
profile_->GetZoomLevelPrefs()->GetDefaultZoomLevelPref()) * 100;
- std::unique_ptr<base::Value> value(new base::FundamentalValue(zoom));
+ std::unique_ptr<base::Value> value(
+ new base::FundamentalValue(std::round(zoom)));
Dan Beam 2016/10/11 01:38:52 does this work well with 33.33%?
return value;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698