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

Side by Side Diff: net/url_request/url_request_throttler_entry.cc

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/url_request/url_request_throttler_entry.h" 5 #include "net/url_request/url_request_throttler_entry.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/metrics/field_trial.h" 11 #include "base/metrics/field_trial.h"
12 #include "base/metrics/histogram_macros.h" 12 #include "base/metrics/histogram_macros.h"
13 #include "base/rand_util.h" 13 #include "base/rand_util.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "net/base/load_flags.h" 16 #include "net/base/load_flags.h"
17 #include "net/log/net_log.h" 17 #include "net/log/net_log_capture_mode.h"
18 #include "net/log/net_log_event_type.h" 18 #include "net/log/net_log_event_type.h"
19 #include "net/log/net_log_source_type.h" 19 #include "net/log/net_log_source_type.h"
20 #include "net/url_request/url_request.h" 20 #include "net/url_request/url_request.h"
21 #include "net/url_request/url_request_context.h" 21 #include "net/url_request/url_request_context.h"
22 #include "net/url_request/url_request_throttler_manager.h" 22 #include "net/url_request/url_request_throttler_manager.h"
23 23
24 namespace net { 24 namespace net {
25 25
26 const int URLRequestThrottlerEntry::kDefaultSlidingWindowPeriodMs = 2000; 26 const int URLRequestThrottlerEntry::kDefaultSlidingWindowPeriodMs = 2000;
27 const int URLRequestThrottlerEntry::kDefaultMaxSendThreshold = 20; 27 const int URLRequestThrottlerEntry::kDefaultMaxSendThreshold = 20;
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 BackoffEntry* URLRequestThrottlerEntry::GetBackoffEntry() { 284 BackoffEntry* URLRequestThrottlerEntry::GetBackoffEntry() {
285 return &backoff_entry_; 285 return &backoff_entry_;
286 } 286 }
287 287
288 // static 288 // static
289 bool URLRequestThrottlerEntry::ExplicitUserRequest(const int load_flags) { 289 bool URLRequestThrottlerEntry::ExplicitUserRequest(const int load_flags) {
290 return (load_flags & LOAD_MAYBE_USER_GESTURE) != 0; 290 return (load_flags & LOAD_MAYBE_USER_GESTURE) != 0;
291 } 291 }
292 292
293 } // namespace net 293 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698