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

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

Issue 6314010: Even more reordering the methods in headers and implementation in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_stream_factory.cc ('k') | net/proxy/polling_proxy_config_service.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_INIT_PROXY_RESOLVER_H_ 5 #ifndef NET_PROXY_INIT_PROXY_RESOLVER_H_
6 #define NET_PROXY_INIT_PROXY_RESOLVER_H_ 6 #define NET_PROXY_INIT_PROXY_RESOLVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // written out to |*effective_config|. Note that this may differ from 56 // written out to |*effective_config|. Note that this may differ from
57 // |config| since we will have stripped any manual settings, and decided 57 // |config| since we will have stripped any manual settings, and decided
58 // whether to use auto-detect or the custom PAC URL. Finally, if auto-detect 58 // whether to use auto-detect or the custom PAC URL. Finally, if auto-detect
59 // was used we may now have resolved that to a specific script URL. 59 // was used we may now have resolved that to a specific script URL.
60 int Init(const ProxyConfig& config, 60 int Init(const ProxyConfig& config,
61 const base::TimeDelta wait_delay, 61 const base::TimeDelta wait_delay,
62 ProxyConfig* effective_config, 62 ProxyConfig* effective_config,
63 CompletionCallback* callback); 63 CompletionCallback* callback);
64 64
65 private: 65 private:
66 struct PacURL {
67 PacURL(bool auto_detect, const GURL& url)
68 : auto_detect(auto_detect), url(url) {}
69 bool auto_detect;
70 GURL url;
71 };
72
73 typedef std::vector<PacURL> UrlList;
74
66 enum State { 75 enum State {
67 STATE_NONE, 76 STATE_NONE,
68 STATE_WAIT, 77 STATE_WAIT,
69 STATE_WAIT_COMPLETE, 78 STATE_WAIT_COMPLETE,
70 STATE_FETCH_PAC_SCRIPT, 79 STATE_FETCH_PAC_SCRIPT,
71 STATE_FETCH_PAC_SCRIPT_COMPLETE, 80 STATE_FETCH_PAC_SCRIPT_COMPLETE,
72 STATE_SET_PAC_SCRIPT, 81 STATE_SET_PAC_SCRIPT,
73 STATE_SET_PAC_SCRIPT_COMPLETE, 82 STATE_SET_PAC_SCRIPT_COMPLETE,
74 }; 83 };
75 84
76 struct PacURL {
77 PacURL(bool auto_detect, const GURL& url)
78 : auto_detect(auto_detect), url(url) {}
79 bool auto_detect;
80 GURL url;
81 };
82
83 typedef std::vector<PacURL> UrlList;
84
85 // Returns ordered list of PAC urls to try for |config|. 85 // Returns ordered list of PAC urls to try for |config|.
86 UrlList BuildPacUrlsFallbackList(const ProxyConfig& config) const; 86 UrlList BuildPacUrlsFallbackList(const ProxyConfig& config) const;
87 87
88 void OnIOCompletion(int result); 88 void OnIOCompletion(int result);
89 int DoLoop(int result); 89 int DoLoop(int result);
90 void DoCallback(int result); 90 void DoCallback(int result);
91 91
92 int DoWait(); 92 int DoWait();
93 int DoWaitComplete(int result); 93 int DoWaitComplete(int result);
94 94
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 base::OneShotTimer<InitProxyResolver> wait_timer_; 135 base::OneShotTimer<InitProxyResolver> wait_timer_;
136 136
137 ProxyConfig* effective_config_; 137 ProxyConfig* effective_config_;
138 138
139 DISALLOW_COPY_AND_ASSIGN(InitProxyResolver); 139 DISALLOW_COPY_AND_ASSIGN(InitProxyResolver);
140 }; 140 };
141 141
142 } // namespace net 142 } // namespace net
143 143
144 #endif // NET_PROXY_INIT_PROXY_RESOLVER_H_ 144 #endif // NET_PROXY_INIT_PROXY_RESOLVER_H_
OLDNEW
« no previous file with comments | « net/http/http_stream_factory.cc ('k') | net/proxy/polling_proxy_config_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698