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

Unified Diff: net/base/host_resolver_proc.h

Issue 525079: Add autodetection of "intranet" redirection, for ISPs etc. that send typos an... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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/test/testing_browser_process.h ('k') | net/base/host_resolver_proc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_proc.h
===================================================================
--- net/base/host_resolver_proc.h (revision 35740)
+++ net/base/host_resolver_proc.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -47,11 +47,18 @@
friend class MockHostResolverBase;
friend class ScopedDefaultHostResolverProc;
- // Sets the previous procedure in the chain.
- void set_previous_proc(HostResolverProc* proc) {
- previous_proc_ = proc;
- }
+ // Sets the previous procedure in the chain. Aborts if this would result in a
+ // cycle.
+ void SetPreviousProc(HostResolverProc* proc);
+ // Sets the last procedure in the chain, i.e. appends |proc| to the end of the
+ // current chain. Aborts if this would result in a cycle.
+ void SetLastProc(HostResolverProc* proc);
+
+ // Returns the last procedure in the chain starting at |proc|. Will return
+ // NULL iff |proc| is NULL.
+ static HostResolverProc* GetLastProc(HostResolverProc* proc);
+
// Sets the default host resolver procedure that is used by HostResolverImpl.
// This can be used through ScopedDefaultHostResolverProc to set a catch-all
// DNS block in unit-tests (individual tests should use MockHostResolver to
@@ -59,7 +66,6 @@
static HostResolverProc* SetDefault(HostResolverProc* proc);
static HostResolverProc* GetDefault();
- private:
scoped_refptr<HostResolverProc> previous_proc_;
static HostResolverProc* default_proc_;
« no previous file with comments | « chrome/test/testing_browser_process.h ('k') | net/base/host_resolver_proc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698