Domain Reliability / Navigation Error Logging, part 1
This is just the logging portion of Domain Reliability; the uploading
and configuration parts will come later.
BUG=
Review URL: https://codereview.chromium.org/132283009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257815 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index 6c99b19..d25f629b2 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -34,6 +34,7 @@
#include "chrome/browser/task_manager/task_manager.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
+#include "components/domain_reliability/monitor.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
@@ -347,6 +348,7 @@
enable_do_not_track_(NULL),
force_google_safe_search_(NULL),
url_blacklist_manager_(NULL),
+ domain_reliability_monitor_(NULL),
received_content_length_(0),
original_content_length_(0) {
DCHECK(event_router);
@@ -518,6 +520,8 @@
void ChromeNetworkDelegate::OnBeforeRedirect(net::URLRequest* request,
const GURL& new_location) {
+ if (domain_reliability_monitor_)
+ domain_reliability_monitor_->OnBeforeRedirect(request);
ExtensionWebRequestEventRouter::GetInstance()->OnBeforeRedirect(
profile_, extension_info_map_.get(), request, new_location);
}
@@ -612,6 +616,8 @@
} else {
NOTREACHED();
}
+ if (domain_reliability_monitor_)
+ domain_reliability_monitor_->OnCompleted(request, started);
ForwardProxyErrors(request, event_router_.get(), profile_);
ForwardRequestStatus(REQUEST_DONE, request, profile_);