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

Unified Diff: chrome/browser/chromeos/proxy_config_service_impl.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: Addressed the nits and rebased on ToT (which now has PART1 in). Created 9 years, 1 month 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/chromeos/proxy_config_service_impl.cc
diff --git a/chrome/browser/chromeos/proxy_config_service_impl.cc b/chrome/browser/chromeos/proxy_config_service_impl.cc
index 97b6aefc4dfdb2bf27747e79959187d507a5020a..bd37a469d14e14f44078f0a87a5890237c48c584 100644
--- a/chrome/browser/chromeos/proxy_config_service_impl.cc
+++ b/chrome/browser/chromeos/proxy_config_service_impl.cc
@@ -526,17 +526,23 @@ void ProxyConfigServiceImpl::OnProxyConfigChanged(
void ProxyConfigServiceImpl::OnSettingsOpCompleted(
SignedSettings::ReturnCode code,
- std::string value) {
+ const base::Value* value) {
+ // We assume ownership here to make sure this gets deleted no matter where
+ // this function ends.
+ scoped_ptr<const base::Value> own_value(value);
+
retrieve_property_op_ = NULL;
if (code != SignedSettings::SUCCESS) {
LOG(WARNING) << this << ": Error retrieving proxy setting from device";
device_config_.clear();
return;
}
- VLOG(1) << this << ": Retrieved proxy setting from device, value=["
- << value << "]";
+ std::string policy_value;
+ value->GetAsString(&policy_value);
+ VLOG(1) << "Retrieved proxy setting from device, value=["
+ << policy_value << "]";
ProxyConfig device_config;
- if (!device_config.DeserializeForDevice(value) ||
+ if (!device_config.DeserializeForDevice(policy_value) ||
!device_config.SerializeForNetwork(&device_config_)) {
LOG(WARNING) << "Can't deserialize device setting or serialize for network";
device_config_.clear();
« no previous file with comments | « chrome/browser/chromeos/proxy_config_service_impl.h ('k') | chrome/browser/chromeos/user_cros_settings_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698