summaryrefslogtreecommitdiffstats
path: root/components/data_reduction_proxy
diff options
context:
space:
mode:
authoreroman <eroman@chromium.org>2015-04-22 20:11:17 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-23 03:11:23 +0000
commit001c374c5356777641161bb11b8dd792508381ca (patch)
tree90ed1b55c3ab4a7aa3d09bb205c6e23035817d22 /components/data_reduction_proxy
parent14ccb93f5f75f388b6a6b4a9c1eb434f61dbbfef (diff)
downloadchromium_src-001c374c5356777641161bb11b8dd792508381ca.zip
chromium_src-001c374c5356777641161bb11b8dd792508381ca.tar.gz
chromium_src-001c374c5356777641161bb11b8dd792508381ca.tar.bz2
Refactor NetLog::LogLevel --> NetLogCaptureMode.
This is both a rename, and a functional change. Before LogLevel was an enum, and consumers would compare its numeric value, or use it for serialization purposes. Whereas NetLogCaptureMode is a class that encapsulates the various capabilities for a logging level. BUG=472710 TBR=asanka@chromium.org,sergeyu@chromium.org,yurys@chromium.org,bengr@chromium.org,asargent@chromium.org,zea@chromium.org,scherkus@chromium.org Review URL: https://codereview.chromium.org/1059843002 Cr-Commit-Position: refs/heads/master@{#326440}
Diffstat (limited to 'components/data_reduction_proxy')
-rw-r--r--components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.cc29
1 files changed, 16 insertions, 13 deletions
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.cc
index e1f41d7..1ce6246 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.cc
@@ -20,7 +20,8 @@ scoped_ptr<base::Value> BuildDataReductionProxyEvent(
base::TimeTicks ticks_now = base::TimeTicks::Now();
net::NetLog::EntryData entry_data(type, source, phase, ticks_now,
&parameters_callback);
- net::NetLog::Entry entry(&entry_data, net::NetLog::LOG_ALL);
+ net::NetLog::Entry entry(&entry_data,
+ net::NetLogCaptureMode::IncludeSocketBytes());
scoped_ptr<base::Value> entry_value(entry.ToValue());
return entry_value;
@@ -52,7 +53,7 @@ base::Value* EnableDataReductionProxyCallback(
const std::string& primary_origin,
const std::string& fallback_origin,
const std::string& ssl_origin,
- net::NetLog::LogLevel /* log_level */) {
+ net::NetLogCaptureMode /* capture_mode */) {
base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetBoolean("enabled", true);
dict->SetBoolean("primary_restricted", primary_restricted);
@@ -67,7 +68,7 @@ base::Value* EnableDataReductionProxyCallback(
// the Data Reduction Proxy. Ownership of the base::Value is passed to the
// caller.
base::Value* DisableDataReductionProxyCallback(
- net::NetLog::LogLevel /* log_level */) {
+ net::NetLogCaptureMode /* capture_mode */) {
base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetBoolean("enabled", false);
return dict;
@@ -76,11 +77,12 @@ base::Value* DisableDataReductionProxyCallback(
// A callback which creates a base::Value containing information about bypassing
// the Data Reduction Proxy. Ownership of the base::Value is passed to the
// caller.
-base::Value* UrlBypassActionCallback(const std::string& action,
- const GURL& url,
- int bypass_seconds,
- int64 expiration_ticks,
- net::NetLog::LogLevel /* log_level */) {
+base::Value* UrlBypassActionCallback(
+ const std::string& action,
+ const GURL& url,
+ int bypass_seconds,
+ int64 expiration_ticks,
+ net::NetLogCaptureMode /* capture_mode */) {
base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetString("action", action);
dict->SetString("url", url.spec());
@@ -98,7 +100,7 @@ base::Value* UrlBypassTypeCallback(
const GURL& url,
int bypass_seconds,
int64 expiration_ticks,
- net::NetLog::LogLevel /* log_level */) {
+ net::NetLogCaptureMode /* capture_mode */) {
base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetInteger("bypass_type", bypass_type);
dict->SetString("url", url.spec());
@@ -111,10 +113,11 @@ base::Value* UrlBypassTypeCallback(
// A callback which creates a base::Value containing information about
// completing the Data Reduction Proxy secure proxy check. Ownership of the
// base::Value is passed to the caller.
-base::Value* EndCanaryRequestCallback(int net_error,
- int http_response_code,
- bool succeeded,
- net::NetLog::LogLevel /* log_level */) {
+base::Value* EndCanaryRequestCallback(
+ int net_error,
+ int http_response_code,
+ bool succeeded,
+ net::NetLogCaptureMode /* capture_mode */) {
base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetInteger("net_error", net_error);
dict->SetInteger("http_response_code", http_response_code);