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

Unified Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 6541021: Send fatal proxy errors to the network delegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 10 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: chrome/browser/net/chrome_network_delegate.cc
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index 0c9272148c20c888c9b767246b50207a0db3a2e5..c37a081f0fddcbe0b91ad4664e800e9f2a2deff3 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -1,12 +1,14 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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/net/chrome_network_delegate.h"
#include "base/logging.h"
+#include "chrome/browser/extensions/extension_proxy_api.h"
#include "chrome/browser/extensions/extension_webrequest_api.h"
#include "chrome/browser/net/chrome_url_request_context.h"
+#include "net/base/net_errors.h"
#include "net/http/http_request_headers.h"
#include "net/url_request/url_request.h"
@@ -37,3 +39,11 @@ void ChromeNetworkDelegate::OnSendHttpRequest(
// TODO(willchan): Add Chrome-side hooks to listen / mutate requests here.
}
+
+void ChromeNetworkDelegate::OnResponseStarted(net::URLRequest* request) {
+ if (request->status().status() == net::URLRequestStatus::FAILED &&
+ request->status().os_error() == net::ERR_PROXY_CONNECTION_FAILED) {
+ ExtensionProxyEventRouter::GetInstance()->OnProxyError(
+ GetIOEventRouter(request->context()));
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698