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

Unified Diff: chrome/browser/renderer_host/thread_hop_resource_throttle.cc

Issue 2282523002: Cleanup by removing thread hop resource throttle code; experiment's over. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove stale include reference. Created 4 years, 4 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 | « chrome/browser/renderer_host/thread_hop_resource_throttle.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/thread_hop_resource_throttle.cc
diff --git a/chrome/browser/renderer_host/thread_hop_resource_throttle.cc b/chrome/browser/renderer_host/thread_hop_resource_throttle.cc
deleted file mode 100644
index cdd71fe66646c458426ffb92c029231621ca5371..0000000000000000000000000000000000000000
--- a/chrome/browser/renderer_host/thread_hop_resource_throttle.cc
+++ /dev/null
@@ -1,59 +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 "chrome/browser/renderer_host/thread_hop_resource_throttle.h"
-
-#include "base/bind.h"
-#include "base/bind_helpers.h"
-#include "base/location.h"
-#include "base/metrics/field_trial.h"
-#include "base/metrics/histogram_macros.h"
-#include "base/strings/string_util.h"
-#include "base/time/time.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/browser/resource_controller.h"
-
-ThreadHopResourceThrottle::ThreadHopResourceThrottle() : weak_factory_(this) {}
-
-ThreadHopResourceThrottle::~ThreadHopResourceThrottle() {}
-
-bool ThreadHopResourceThrottle::IsEnabled() {
- const std::string group_name =
- base::FieldTrialList::FindFullName("ThreadHopResourceThrottle");
- return base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
-}
-
-void ThreadHopResourceThrottle::WillStartRequest(bool* defer) {
- *defer = true;
- ResumeAfterThreadHop();
-}
-
-void ThreadHopResourceThrottle::WillRedirectRequest(
- const net::RedirectInfo& redirect_info,
- bool* defer) {
- *defer = true;
- ResumeAfterThreadHop();
-}
-
-void ThreadHopResourceThrottle::WillProcessResponse(bool* defer) {
- *defer = true;
- ResumeAfterThreadHop();
-}
-
-const char* ThreadHopResourceThrottle::GetNameForLogging() const {
- return "ThreadHopResourceThrottle";
-}
-
-void ThreadHopResourceThrottle::ResumeAfterThreadHop() {
- content::BrowserThread::PostTaskAndReply(
- content::BrowserThread::UI, FROM_HERE, base::Bind(&base::DoNothing),
- base::Bind(&ThreadHopResourceThrottle::Resume, weak_factory_.GetWeakPtr(),
- base::TimeTicks::Now()));
-}
-
-void ThreadHopResourceThrottle::Resume(const base::TimeTicks& time) {
- UMA_HISTOGRAM_TIMES("Net.ThreadHopResourceThrottleTime",
- base::TimeTicks::Now() - time);
- controller()->Resume();
-}
« no previous file with comments | « chrome/browser/renderer_host/thread_hop_resource_throttle.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698