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

Unified Diff: chrome/common/net/net_error_tracker.cc

Issue 13270005: Display DNS probe results. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix one last nit Created 7 years, 5 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/common/net/net_error_tracker.h ('k') | chrome/common/net/net_error_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/net_error_tracker.cc
diff --git a/chrome/common/net/net_error_tracker.cc b/chrome/common/net/net_error_tracker.cc
deleted file mode 100644
index 6cf69ca054eecc07ed3c1f8c7cffabaf3972fedf..0000000000000000000000000000000000000000
--- a/chrome/common/net/net_error_tracker.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2013 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/common/net/net_error_tracker.h"
-
-NetErrorTracker::NetErrorTracker(const Callback& callback)
- : callback_(callback),
- load_state_(LOAD_NONE),
- load_type_(PAGE_NORMAL),
- error_type_(ERROR_OTHER),
- dns_error_page_state_(DNS_ERROR_PAGE_NONE) {
-}
-
-NetErrorTracker::~NetErrorTracker() {
-}
-
-void NetErrorTracker::OnStartProvisionalLoad(FrameType frame, PageType page) {
- if (frame == FRAME_SUB)
- return;
-
- load_state_ = LOAD_STARTED;
- load_type_ = page;
-
- // TODO(ttuttle): Add support for aborts, then move this to OnCommit.
- if (load_type_ == PAGE_NORMAL)
- SetDnsErrorPageState(DNS_ERROR_PAGE_NONE);
-}
-
-void NetErrorTracker::OnCommitProvisionalLoad(FrameType frame) {
- if (frame == FRAME_SUB)
- return;
-
- load_state_ = LOAD_COMMITTED;
-}
-
-void NetErrorTracker::OnFailProvisionalLoad(FrameType frame, ErrorType error) {
- if (frame == FRAME_SUB)
- return;
-
- load_state_ = LOAD_FAILED;
-
- if (load_type_ == PAGE_NORMAL) {
- error_type_ = error;
- if (error_type_ == ERROR_DNS)
- SetDnsErrorPageState(DNS_ERROR_PAGE_PENDING);
- }
-}
-
-void NetErrorTracker::OnFinishLoad(FrameType frame) {
- if (frame == FRAME_SUB)
- return;
-
- load_state_ = LOAD_FINISHED;
-
- if (load_type_ == PAGE_ERROR && error_type_ == ERROR_DNS)
- SetDnsErrorPageState(DNS_ERROR_PAGE_LOADED);
-}
-
-void NetErrorTracker::SetDnsErrorPageState(DnsErrorPageState state) {
- if (state == dns_error_page_state_)
- return;
-
- dns_error_page_state_ = state;
- callback_.Run(state);
-}
« no previous file with comments | « chrome/common/net/net_error_tracker.h ('k') | chrome/common/net/net_error_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698