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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 396493004: Get rid of some uses of CreateDoubleValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: right number of args + fix lint error Created 6 years, 5 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/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index bb52a9717c8658cb0bbc184f1eb7382ea80f122f..40904e3c49b1282bd8fa2932d82522c5c03eae5d 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -1074,12 +1074,10 @@ void ProfileImpl::OnZoomLevelChanged(
double level = change.zoom_level;
DictionaryPrefUpdate update(prefs_.get(), prefs::kPerHostZoomLevels);
base::DictionaryValue* host_zoom_dictionary = update.Get();
- if (content::ZoomValuesEqual(level, host_zoom_map->GetDefaultZoomLevel())) {
+ if (content::ZoomValuesEqual(level, host_zoom_map->GetDefaultZoomLevel()))
host_zoom_dictionary->RemoveWithoutPathExpansion(change.host, NULL);
- } else {
- host_zoom_dictionary->SetWithoutPathExpansion(
- change.host, base::Value::CreateDoubleValue(level));
- }
+ else
+ host_zoom_dictionary->SetDoubleWithoutPathExpansion(change.host, level);
}
#if defined(ENABLE_SESSION_SERVICE)

Powered by Google App Engine
This is Rietveld 408576698