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

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

Issue 14500: Temp experiment to confirm theory in crbug.com/5555.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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
« no previous file with comments | « base/message_loop.h ('k') | net/proxy/proxy_script_fetcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 // ProxyScriptFetcher is an async interface for fetching a proxy auto config 5 // ProxyScriptFetcher is an async interface for fetching a proxy auto config
6 // script. It is specific to fetching a PAC script; enforces timeout, max-size, 6 // script. It is specific to fetching a PAC script; enforces timeout, max-size,
7 // status code. 7 // status code.
8 8
9 #ifndef NET_PROXY_PROXY_SCRIPT_FETCHER_H_ 9 #ifndef NET_PROXY_PROXY_SCRIPT_FETCHER_H_
10 #define NET_PROXY_PROXY_SCRIPT_FETCHER_H_ 10 #define NET_PROXY_PROXY_SCRIPT_FETCHER_H_
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // Aborts the in-progress fetch (if any). 43 // Aborts the in-progress fetch (if any).
44 virtual void Cancel() = 0; 44 virtual void Cancel() = 0;
45 45
46 // Create a ProxyScriptFetcher that uses |url_request_context|. 46 // Create a ProxyScriptFetcher that uses |url_request_context|.
47 static ProxyScriptFetcher* Create(URLRequestContext* url_request_context); 47 static ProxyScriptFetcher* Create(URLRequestContext* url_request_context);
48 48
49 // -------------------------------------------------------------------------- 49 // --------------------------------------------------------------------------
50 // Testing helpers (only available to unit-tests). 50 // Testing helpers (only available to unit-tests).
51 // -------------------------------------------------------------------------- 51 // --------------------------------------------------------------------------
52 private: 52 private:
53 FRIEND_TEST(ProxyScriptFetcherTest, DISABLED_Hang); 53 FRIEND_TEST(ProxyScriptFetcherTest, Hang);
54 FRIEND_TEST(ProxyScriptFetcherTest, DISABLED_TooLarge); 54 FRIEND_TEST(ProxyScriptFetcherTest, TooLarge);
55 55
56 // Sets the maximum duration for a fetch to |timeout_ms|. Returns the previous 56 // Sets the maximum duration for a fetch to |timeout_ms|. Returns the previous
57 // bound. 57 // bound.
58 static int SetTimeoutConstraintForUnittest(int timeout_ms); 58 static int SetTimeoutConstraintForUnittest(int timeout_ms);
59 59
60 // Sets the maximum response size for a fetch to |size_bytes|. Returns the 60 // Sets the maximum response size for a fetch to |size_bytes|. Returns the
61 // previous bound. 61 // previous bound.
62 static size_t SetSizeConstraintForUnittest(size_t size_bytes); 62 static size_t SetSizeConstraintForUnittest(size_t size_bytes);
63 }; 63 };
64 64
65 } // namespace net 65 } // namespace net
66 66
67 #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_H_ 67 #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_H_
OLDNEW
« no previous file with comments | « base/message_loop.h ('k') | net/proxy/proxy_script_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698