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

Unified Diff: net/proxy/load_state_change_coalescer.cc

Issue 1145153004: Split ProxyResolverV8Tracing into an implementation and a wrapper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/proxy/load_state_change_coalescer.h ('k') | net/proxy/load_state_change_coalescer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/load_state_change_coalescer.cc
diff --git a/net/proxy/load_state_change_coalescer.cc b/net/proxy/load_state_change_coalescer.cc
deleted file mode 100644
index ae15e53d8fce812ba0dd4763ae4821d7c63c2fd3..0000000000000000000000000000000000000000
--- a/net/proxy/load_state_change_coalescer.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/proxy/load_state_change_coalescer.h"
-
-namespace net {
-
-LoadStateChangeCoalescer::LoadStateChangeCoalescer(
- const base::Callback<void(LoadState)>& callback,
- const base::TimeDelta& timeout,
- LoadState initial_load_state)
- : callback_(callback),
- timeout_(timeout),
- committed_load_state_(initial_load_state),
- pending_load_state_(initial_load_state) {
-}
-
-void LoadStateChangeCoalescer::LoadStateChanged(LoadState load_state) {
- if (load_state == committed_load_state_) {
- timer_.Stop();
- return;
- }
- pending_load_state_ = load_state;
- timer_.Start(FROM_HERE, timeout_, this,
- &LoadStateChangeCoalescer::SendLoadStateChanged);
-}
-
-LoadStateChangeCoalescer::~LoadStateChangeCoalescer() = default;
-
-void LoadStateChangeCoalescer::SendLoadStateChanged() {
- committed_load_state_ = pending_load_state_;
- callback_.Run(pending_load_state_);
-}
-
-} // namespace net
« no previous file with comments | « net/proxy/load_state_change_coalescer.h ('k') | net/proxy/load_state_change_coalescer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698