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

Unified Diff: net/url_request/url_request_throttler_entry.cc

Issue 2315613002: Extracted NetLog class's inner enum types into their own enum classes and (Closed)
Patch Set: Ran "git cl format" on code. Much formatting ensued. Created 4 years, 3 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
« no previous file with comments | « net/url_request/url_request_redirect_job.cc ('k') | net/url_request/url_request_throttler_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_throttler_entry.cc
diff --git a/net/url_request/url_request_throttler_entry.cc b/net/url_request/url_request_throttler_entry.cc
index 304d7d18465431b541ad7f53eea4de75f9bec40d..ce7778d83b38083a56e4c36188e5e8ef04db7c7e 100644
--- a/net/url_request/url_request_throttler_entry.cc
+++ b/net/url_request/url_request_throttler_entry.cc
@@ -15,6 +15,8 @@
#include "base/values.h"
#include "net/base/load_flags.h"
#include "net/log/net_log.h"
+#include "net/log/net_log_event_type.h"
+#include "net/log/net_log_source_type.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_throttler_manager.h"
@@ -71,8 +73,9 @@ URLRequestThrottlerEntry::URLRequestThrottlerEntry(
backoff_entry_(&backoff_policy_),
manager_(manager),
url_id_(url_id),
- net_log_(BoundNetLog::Make(
- manager->net_log(), NetLog::SOURCE_EXPONENTIAL_BACKOFF_THROTTLING)) {
+ net_log_(
+ BoundNetLog::Make(manager->net_log(),
+ NetLogSourceType::EXPONENTIAL_BACKOFF_THROTTLING)) {
DCHECK(manager_);
Initialize();
}
@@ -152,12 +155,10 @@ bool URLRequestThrottlerEntry::ShouldRejectRequest(
bool reject_request = false;
if (!is_backoff_disabled_ && !ExplicitUserRequest(request.load_flags()) &&
GetBackoffEntry()->ShouldRejectRequest()) {
- net_log_.AddEvent(
- NetLog::TYPE_THROTTLING_REJECTED_REQUEST,
- base::Bind(&NetLogRejectedRequestCallback,
- &url_id_,
- GetBackoffEntry()->failure_count(),
- GetBackoffEntry()->GetTimeUntilRelease()));
+ net_log_.AddEvent(NetLogEventType::THROTTLING_REJECTED_REQUEST,
+ base::Bind(&NetLogRejectedRequestCallback, &url_id_,
+ GetBackoffEntry()->failure_count(),
+ GetBackoffEntry()->GetTimeUntilRelease()));
reject_request = true;
}
« no previous file with comments | « net/url_request/url_request_redirect_job.cc ('k') | net/url_request/url_request_throttler_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698