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

Side by Side Diff: net/proxy/proxy_resolver.h

Issue 5841002: Finish deinlining virtual methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert parts of the balloon modifications Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_PROXY_PROXY_RESOLVER_H_ 5 #ifndef NET_PROXY_PROXY_RESOLVER_H_
6 #define NET_PROXY_PROXY_RESOLVER_H_ 6 #define NET_PROXY_PROXY_RESOLVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 // Cancels |request|. 48 // Cancels |request|.
49 virtual void CancelRequest(RequestHandle request) = 0; 49 virtual void CancelRequest(RequestHandle request) = 0;
50 50
51 // The PAC script backend can be specified to the ProxyResolver either via 51 // The PAC script backend can be specified to the ProxyResolver either via
52 // URL, or via the javascript text itself. If |expects_pac_bytes| is true, 52 // URL, or via the javascript text itself. If |expects_pac_bytes| is true,
53 // then the ProxyResolverScriptData passed to SetPacScript() should 53 // then the ProxyResolverScriptData passed to SetPacScript() should
54 // contain the actual script bytes rather than just the URL. 54 // contain the actual script bytes rather than just the URL.
55 bool expects_pac_bytes() const { return expects_pac_bytes_; } 55 bool expects_pac_bytes() const { return expects_pac_bytes_; }
56 56
57 // TODO(eroman): Make this =0. 57 virtual void CancelSetPacScript() = 0;
58 virtual void CancelSetPacScript() {
59 NOTREACHED();
60 }
61 58
62 // Frees any unneeded memory held by the resolver, e.g. garbage in the JS 59 // Frees any unneeded memory held by the resolver, e.g. garbage in the JS
63 // engine. Most subclasses don't need to do anything, so we provide a default 60 // engine. Most subclasses don't need to do anything, so we provide a default
64 // no-op implementation. 61 // no-op implementation.
65 virtual void PurgeMemory() {} 62 virtual void PurgeMemory() {}
66 63
67 // Called to set the PAC script backend to use. 64 // Called to set the PAC script backend to use.
68 // Returns ERR_IO_PENDING in the case of asynchronous completion, and notifies 65 // Returns ERR_IO_PENDING in the case of asynchronous completion, and notifies
69 // the result through |callback|. 66 // the result through |callback|.
70 virtual int SetPacScript( 67 virtual int SetPacScript(
71 const scoped_refptr<ProxyResolverScriptData>& pac_script, 68 const scoped_refptr<ProxyResolverScriptData>& pac_script,
72 CompletionCallback* callback) = 0; 69 CompletionCallback* callback) = 0;
73 70
74 // Optional shutdown code to be run before destruction. This is only used 71 // Optional shutdown code to be run before destruction. This is only used
75 // by the multithreaded runner to signal cleanup from origin thread 72 // by the multithreaded runner to signal cleanup from origin thread
76 virtual void Shutdown() {} 73 virtual void Shutdown() {}
77 74
78 private: 75 private:
79 const bool expects_pac_bytes_; 76 const bool expects_pac_bytes_;
80 77
81 DISALLOW_COPY_AND_ASSIGN(ProxyResolver); 78 DISALLOW_COPY_AND_ASSIGN(ProxyResolver);
82 }; 79 };
83 80
84 } // namespace net 81 } // namespace net
85 82
86 #endif // NET_PROXY_PROXY_RESOLVER_H_ 83 #endif // NET_PROXY_PROXY_RESOLVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698