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

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

Issue 10534132: NetLogEventParameter to Callback refactoring 7. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Update unit test Created 8 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SCRIPT_DECIDER_H_ 5 #ifndef NET_PROXY_PROXY_SCRIPT_DECIDER_H_
6 #define NET_PROXY_PROXY_SCRIPT_DECIDER_H_ 6 #define NET_PROXY_PROXY_SCRIPT_DECIDER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/string16.h" 13 #include "base/string16.h"
13 #include "base/time.h" 14 #include "base/time.h"
14 #include "base/timer.h" 15 #include "base/timer.h"
15 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
16 #include "net/base/completion_callback.h" 17 #include "net/base/completion_callback.h"
17 #include "net/base/net_export.h" 18 #include "net/base/net_export.h"
18 #include "net/base/net_log.h" 19 #include "net/base/net_log.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // Tries restarting using the next fallback PAC URL: 125 // Tries restarting using the next fallback PAC URL:
125 // |pac_sources_[++current_pac_source_index]|. 126 // |pac_sources_[++current_pac_source_index]|.
126 // Returns OK and rewinds the state machine when there 127 // Returns OK and rewinds the state machine when there
127 // is something to try, otherwise returns |error|. 128 // is something to try, otherwise returns |error|.
128 int TryToFallbackPacSource(int error); 129 int TryToFallbackPacSource(int error);
129 130
130 // Gets the initial state (we skip fetching when the 131 // Gets the initial state (we skip fetching when the
131 // ProxyResolver doesn't |expect_pac_bytes()|. 132 // ProxyResolver doesn't |expect_pac_bytes()|.
132 State GetStartState() const; 133 State GetStartState() const;
133 134
134 NetLogStringParameter* CreateNetLogParameterAndDetermineURL( 135 void CreateSourceStringAndDetermineURL(
135 const PacSource& pac_source, GURL* effective_pac_url); 136 const PacSource& pac_source,
137 GURL* effective_pac_url,
138 std::string* source_string);
136 139
137 // Returns the current PAC URL we are fetching/testing. 140 // Returns the current PAC URL we are fetching/testing.
138 const PacSource& current_pac_source() const; 141 const PacSource& current_pac_source() const;
139 142
140 void OnWaitTimerFired(); 143 void OnWaitTimerFired();
141 void DidComplete(); 144 void DidComplete();
142 void Cancel(); 145 void Cancel();
143 146
144 ProxyResolver* resolver_; 147 ProxyResolver* resolver_;
145 ProxyScriptFetcher* proxy_script_fetcher_; 148 ProxyScriptFetcher* proxy_script_fetcher_;
(...skipping 24 matching lines...) Expand all
170 ProxyConfig effective_config_; 173 ProxyConfig effective_config_;
171 scoped_refptr<ProxyResolverScriptData> script_data_; 174 scoped_refptr<ProxyResolverScriptData> script_data_;
172 175
173 176
174 DISALLOW_COPY_AND_ASSIGN(ProxyScriptDecider); 177 DISALLOW_COPY_AND_ASSIGN(ProxyScriptDecider);
175 }; 178 };
176 179
177 } // namespace net 180 } // namespace net
178 181
179 #endif // NET_PROXY_PROXY_SCRIPT_DECIDER_H_ 182 #endif // NET_PROXY_PROXY_SCRIPT_DECIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698