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

Unified Diff: content/browser/host_zoom_map.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/test/webdriver/cookie.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/host_zoom_map.cc
diff --git a/content/browser/host_zoom_map.cc b/content/browser/host_zoom_map.cc
index 3d504034e3f9c513740bd8890e251e7a769164f0..98ebc1c32ba02c2d41994a00cabc6d677a5a95fe 100644
--- a/content/browser/host_zoom_map.cc
+++ b/content/browser/host_zoom_map.cc
@@ -64,24 +64,6 @@ void HostZoomMap::Load() {
bool success = host_zoom_dictionary->GetDoubleWithoutPathExpansion(
host, &zoom_level);
- if (!success) {
- // The data used to be stored as ints, so try that.
- int int_zoom_level;
- success = host_zoom_dictionary->GetIntegerWithoutPathExpansion(
- host, &int_zoom_level);
- if (success) {
- zoom_level = static_cast<double>(int_zoom_level);
- // Since the values were once stored as non-clamped, clamp now.
- double zoom_factor = WebView::zoomLevelToZoomFactor(zoom_level);
- if (zoom_factor < WebView::minTextSizeMultiplier) {
- zoom_level =
- WebView::zoomFactorToZoomLevel(WebView::minTextSizeMultiplier);
- } else if (zoom_factor > WebView::maxTextSizeMultiplier) {
- zoom_level =
- WebView::zoomFactorToZoomLevel(WebView::maxTextSizeMultiplier);
- }
- }
- }
DCHECK(success);
host_zoom_levels_[host] = zoom_level;
}
« no previous file with comments | « chrome/test/webdriver/cookie.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698