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

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

Issue 7044058: Cancel when InitProxyResolver cancels, so we don't use callback later. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add regression test, and fix NULL check (caught by existing test). Created 9 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
« no previous file with comments | « net/proxy/dhcp_proxy_script_fetcher_win.cc ('k') | net/proxy/init_proxy_resolver_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) 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 proxy_script_fetcher_->Cancel(); 364 proxy_script_fetcher_->Cancel();
365 break; 365 break;
366 case STATE_SET_PAC_SCRIPT_COMPLETE: 366 case STATE_SET_PAC_SCRIPT_COMPLETE:
367 resolver_->CancelSetPacScript(); 367 resolver_->CancelSetPacScript();
368 break; 368 break;
369 default: 369 default:
370 NOTREACHED(); 370 NOTREACHED();
371 break; 371 break;
372 } 372 }
373 373
374 // This is safe to call in any state.
375 if (dhcp_proxy_script_fetcher_)
376 dhcp_proxy_script_fetcher_->Cancel();
377
374 DidCompleteInit(); 378 DidCompleteInit();
375 } 379 }
376 380
377 } // namespace net 381 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/dhcp_proxy_script_fetcher_win.cc ('k') | net/proxy/init_proxy_resolver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698