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

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc

Issue 1020863009: Revert of Add ClientConfig proto, and JSON generation/parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc
index 3769f3a3683031c1a9a3f2fb08df16a621f370da..770e3316cf1ddb26fe353e3174b09ec9e3e99bb0 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc
@@ -7,11 +7,8 @@
#include <string>
#include "base/command_line.h"
-#include "base/memory/scoped_ptr.h"
#include "base/metrics/field_trial.h"
#include "base/strings/string_piece.h"
-#include "base/values.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_client_config_parser.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
#include "net/base/host_port_pair.h"
#include "net/proxy/proxy_server.h"
@@ -39,11 +36,6 @@
const char kAndroidOneIdentifier[] = "sprout";
const char kQuicFieldTrial[] = "DataReductionProxyUseQuic";
-
-const char kConfigScheme[] = "scheme";
-const char kConfigHost[] = "host";
-const char kConfigPort[] = "port";
-
} // namespace
namespace data_reduction_proxy {
@@ -394,41 +386,6 @@
return false;
}
-void DataReductionProxyParams::PopulateConfigResponse(
- base::DictionaryValue* response) const {
- scoped_ptr<base::Value> proxy_config(new base::DictionaryValue());
- if (!holdback_) {
- base::DictionaryValue* proxy_config_dict = nullptr;
- if (!proxy_config->GetAsDictionary(&proxy_config_dict))
- return;
-
- scoped_ptr<base::Value> proxy_servers(new base::ListValue());
- base::ListValue* proxy_servers_list = nullptr;
- if (!proxy_servers->GetAsList(&proxy_servers_list))
- return;
-
- proxy_servers->GetAsList(&proxy_servers_list);
- scoped_ptr<base::DictionaryValue> server(new base::DictionaryValue());
-
- server->SetString(kConfigScheme,
- config_parser::GetSchemeString(origin_.scheme()));
- server->SetString(kConfigHost, origin_.host_port_pair().host());
- server->SetInteger(kConfigPort, origin_.host_port_pair().port());
- proxy_servers_list->Append(server.release());
- server.reset(new base::DictionaryValue());
-
- server->SetString(kConfigScheme, config_parser::GetSchemeString(
- fallback_origin_.scheme()));
- server->SetString(kConfigHost, fallback_origin_.host_port_pair().host());
- server->SetInteger(kConfigPort, fallback_origin_.host_port_pair().port());
- proxy_servers_list->Append(server.release());
-
- proxy_config_dict->Set("httpProxyServers", proxy_servers.Pass());
- }
-
- response->Set("proxyConfig", proxy_config.Pass());
-}
-
// Returns the data reduction proxy primary origin.
const net::ProxyServer& DataReductionProxyParams::origin() const {
return origin_;

Powered by Google App Engine
This is Rietveld 408576698