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

Unified Diff: extensions/browser/extension_throttle_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
Index: extensions/browser/extension_throttle_entry.cc
diff --git a/extensions/browser/extension_throttle_entry.cc b/extensions/browser/extension_throttle_entry.cc
index e81a7330d2293e4f8460394ab260ede524061eda..1960b07c190e3c35430d33f625080f7587b111fc 100644
--- a/extensions/browser/extension_throttle_entry.cc
+++ b/extensions/browser/extension_throttle_entry.cc
@@ -14,6 +14,8 @@
#include "extensions/browser/extension_throttle_manager.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"
@@ -78,7 +80,7 @@ ExtensionThrottleEntry::ExtensionThrottleEntry(
url_id_(url_id),
net_log_(net::BoundNetLog::Make(
manager->net_log(),
- net::NetLog::SOURCE_EXPONENTIAL_BACKOFF_THROTTLING)),
+ net::NetLogSourceType::EXPONENTIAL_BACKOFF_THROTTLING)),
ignore_user_gesture_load_flag_for_tests_(
ignore_user_gesture_load_flag_for_tests) {
DCHECK(manager_);
@@ -151,7 +153,7 @@ bool ExtensionThrottleEntry::ShouldRejectRequest(
if (!is_backoff_disabled_ && (ignore_user_gesture_load_flag_for_tests_ ||
!ExplicitUserRequest(request.load_flags())) &&
GetBackoffEntry()->ShouldRejectRequest()) {
- net_log_.AddEvent(net::NetLog::TYPE_THROTTLING_REJECTED_REQUEST,
+ net_log_.AddEvent(net::NetLogEventType::THROTTLING_REJECTED_REQUEST,
base::Bind(&NetLogRejectedRequestCallback, &url_id_,
GetBackoffEntry()->failure_count(),
GetBackoffEntry()->GetTimeUntilRelease()));
« no previous file with comments | « extensions/browser/api/web_request/web_request_api_helpers.cc ('k') | extensions/browser/extension_throttle_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698