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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_params.cc

Issue 412143009: Moved data reduction proxy initialization logic to ProfileImplIOData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments from willchan and sgurun 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: components/data_reduction_proxy/browser/data_reduction_proxy_params.cc
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc
index fa75c6b6cb7a5e255799742c871ca198a55e7d78..5d4e0b38debb38f3f55bc6da55d0e4f53ee26452 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc
@@ -5,6 +5,7 @@
#include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h"
#include "base/command_line.h"
+#include "base/memory/scoped_ptr.h"
#include "base/metrics/field_trial.h"
#include "base/time/time.h"
#include "components/data_reduction_proxy/common/data_reduction_proxy_switches.h"
@@ -73,6 +74,28 @@ DataReductionProxyParams::DataReductionProxyParams(int flags)
DCHECK(result);
}
+scoped_ptr<DataReductionProxyParams> DataReductionProxyParams::Clone() {
+ return scoped_ptr<DataReductionProxyParams>(
+ new DataReductionProxyParams(*this));
+}
+
+DataReductionProxyParams::DataReductionProxyParams(
+ const DataReductionProxyParams& other)
+ : origin_(other.origin_),
+ fallback_origin_(other.fallback_origin_),
+ ssl_origin_(other.ssl_origin_),
+ alt_origin_(other.alt_origin_),
+ alt_fallback_origin_(other.alt_fallback_origin_),
+ probe_url_(other.probe_url_),
+ warmup_url_(other.warmup_url_),
+ allowed_(other.allowed_),
+ fallback_allowed_(other.fallback_allowed_),
+ alt_allowed_(other.alt_allowed_),
+ promo_allowed_(other.promo_allowed_),
+ holdback_(other.holdback_),
+ configured_on_command_line_(other.configured_on_command_line_) {
+}
+
DataReductionProxyParams::~DataReductionProxyParams() {
}
@@ -462,4 +485,24 @@ std::string DataReductionProxyParams::GetDefaultWarmupURL() const {
return std::string();
}
+DataReductionProxyParams& DataReductionProxyParams::operator=(
willchan no longer on Chromium 2014/08/04 23:13:46 What happens if you don't define this? Does anythi
bengr 2014/08/05 02:35:07 No link error. Interesting. Done.
willchan no longer on Chromium 2014/08/05 03:03:52 DISALLOW_COPY_AND_ASSIGN() just declares the copy
+ const DataReductionProxyParams &params) {
+ if (this != &params) {
+ origin_ = params.origin_;
+ fallback_origin_ = params.fallback_origin_;
+ ssl_origin_ = params.ssl_origin_;
+ alt_origin_ = params.alt_origin_;
+ alt_fallback_origin_ = params.alt_fallback_origin_;
+ probe_url_ = params.probe_url_;
+ warmup_url_ = params.warmup_url_;
+ allowed_ = params.allowed_;
+ fallback_allowed_ = params.fallback_allowed_;
+ alt_allowed_ = params.alt_allowed_;
+ promo_allowed_ = params.promo_allowed_;
+ holdback_ = params.holdback_;
+ configured_on_command_line_ = params.configured_on_command_line_;
+ }
+ return *this;
+}
+
} // namespace data_reduction_proxy

Powered by Google App Engine
This is Rietveld 408576698