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

Unified Diff: chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc

Issue 8091002: PART2: Make SignedSettings use proper Value types instead of string all around the place. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed some memory leaks in tests. Created 9 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
Index: chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
index 1e7e1f5b79258810bf2a7ae2a36d7a94f7eeee4a..bc867cbbb9b4b3b68b8b09f956b45f06da78aec3 100644
--- a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
@@ -100,9 +100,7 @@ void CoreChromeOSOptionsHandler::SetPref(const std::string& pref_name,
if (!CrosSettings::IsCrosSettings(pref_name))
return ::CoreOptionsHandler::SetPref(pref_name, value, metric);
handling_change_ = true;
- // CrosSettings takes ownership of its value so we need to copy it.
- base::Value* pref_value = value->DeepCopy();
- CrosSettings::Get()->Set(pref_name, pref_value);
+ CrosSettings::Get()->Set(pref_name, *value);
handling_change_ = false;
ProcessUserMetric(value, metric);

Powered by Google App Engine
This is Rietveld 408576698