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

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

Issue 2351513002: net: rename BoundNetLog to NetLogWithSource (Closed)
Patch Set: one more fix, content bound_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"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 URLRequestThrottlerEntry::URLRequestThrottlerEntry( 66 URLRequestThrottlerEntry::URLRequestThrottlerEntry(
67 URLRequestThrottlerManager* manager, 67 URLRequestThrottlerManager* manager,
68 const std::string& url_id) 68 const std::string& url_id)
69 : sliding_window_period_( 69 : sliding_window_period_(
70 base::TimeDelta::FromMilliseconds(kDefaultSlidingWindowPeriodMs)), 70 base::TimeDelta::FromMilliseconds(kDefaultSlidingWindowPeriodMs)),
71 max_send_threshold_(kDefaultMaxSendThreshold), 71 max_send_threshold_(kDefaultMaxSendThreshold),
72 is_backoff_disabled_(false), 72 is_backoff_disabled_(false),
73 backoff_entry_(&backoff_policy_), 73 backoff_entry_(&backoff_policy_),
74 manager_(manager), 74 manager_(manager),
75 url_id_(url_id), 75 url_id_(url_id),
76 net_log_( 76 net_log_(NetLogWithSource::Make(
77 BoundNetLog::Make(manager->net_log(), 77 manager->net_log(),
78 NetLogSourceType::EXPONENTIAL_BACKOFF_THROTTLING)) { 78 NetLogSourceType::EXPONENTIAL_BACKOFF_THROTTLING)) {
79 DCHECK(manager_); 79 DCHECK(manager_);
80 Initialize(); 80 Initialize();
81 } 81 }
82 82
83 URLRequestThrottlerEntry::URLRequestThrottlerEntry( 83 URLRequestThrottlerEntry::URLRequestThrottlerEntry(
84 URLRequestThrottlerManager* manager, 84 URLRequestThrottlerManager* manager,
85 const std::string& url_id, 85 const std::string& url_id,
86 int sliding_window_period_ms, 86 int sliding_window_period_ms,
87 int max_send_threshold, 87 int max_send_threshold,
88 int initial_backoff_ms, 88 int initial_backoff_ms,
(...skipping 195 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