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

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

Issue 7812036: Update base/timer.h code to pass through Location from call sites. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "net/proxy/init_proxy_resolver.h" 5 #include "net/proxy/init_proxy_resolver.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 158 }
159 159
160 int InitProxyResolver::DoWait() { 160 int InitProxyResolver::DoWait() {
161 next_state_ = STATE_WAIT_COMPLETE; 161 next_state_ = STATE_WAIT_COMPLETE;
162 162
163 // If no waiting is required, continue on to the next state. 163 // If no waiting is required, continue on to the next state.
164 if (wait_delay_.ToInternalValue() == 0) 164 if (wait_delay_.ToInternalValue() == 0)
165 return OK; 165 return OK;
166 166
167 // Otherwise wait the specified amount of time. 167 // Otherwise wait the specified amount of time.
168 wait_timer_.Start(wait_delay_, this, &InitProxyResolver::OnWaitTimerFired); 168 wait_timer_.Start(FROM_HERE, wait_delay_, this,
169 &InitProxyResolver::OnWaitTimerFired);
169 net_log_.BeginEvent(NetLog::TYPE_INIT_PROXY_RESOLVER_WAIT, NULL); 170 net_log_.BeginEvent(NetLog::TYPE_INIT_PROXY_RESOLVER_WAIT, NULL);
170 return ERR_IO_PENDING; 171 return ERR_IO_PENDING;
171 } 172 }
172 173
173 int InitProxyResolver::DoWaitComplete(int result) { 174 int InitProxyResolver::DoWaitComplete(int result) {
174 DCHECK_EQ(OK, result); 175 DCHECK_EQ(OK, result);
175 if (wait_delay_.ToInternalValue() != 0) { 176 if (wait_delay_.ToInternalValue() != 0) {
176 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_INIT_PROXY_RESOLVER_WAIT, 177 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_INIT_PROXY_RESOLVER_WAIT,
177 result); 178 result);
178 } 179 }
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 } 373 }
373 374
374 // This is safe to call in any state. 375 // This is safe to call in any state.
375 if (dhcp_proxy_script_fetcher_) 376 if (dhcp_proxy_script_fetcher_)
376 dhcp_proxy_script_fetcher_->Cancel(); 377 dhcp_proxy_script_fetcher_->Cancel();
377 378
378 DidCompleteInit(); 379 DidCompleteInit();
379 } 380 }
380 381
381 } // namespace net 382 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc ('k') | net/proxy/proxy_config_service_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698