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

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

Issue 962373002: ProxyScriptDecider: Fix NOTREACHED in Cancel() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | net/proxy/proxy_script_decider_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) 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 #include "net/proxy/proxy_script_decider.h" 5 #include "net/proxy/proxy_script_decider.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 net_log_.AddEvent(NetLog::TYPE_CANCELLED); 465 net_log_.AddEvent(NetLog::TYPE_CANCELLED);
466 466
467 switch (next_state_) { 467 switch (next_state_) {
468 case STATE_WAIT_COMPLETE: 468 case STATE_WAIT_COMPLETE:
469 wait_timer_.Stop(); 469 wait_timer_.Stop();
470 break; 470 break;
471 case STATE_FETCH_PAC_SCRIPT_COMPLETE: 471 case STATE_FETCH_PAC_SCRIPT_COMPLETE:
472 proxy_script_fetcher_->Cancel(); 472 proxy_script_fetcher_->Cancel();
473 break; 473 break;
474 default: 474 default:
475 NOTREACHED();
476 break; 475 break;
477 } 476 }
478 477
479 // This is safe to call in any state. 478 // This is safe to call in any state.
480 if (dhcp_proxy_script_fetcher_) 479 if (dhcp_proxy_script_fetcher_)
481 dhcp_proxy_script_fetcher_->Cancel(); 480 dhcp_proxy_script_fetcher_->Cancel();
482 481
483 DidComplete(); 482 DidComplete();
484 } 483 }
485 484
486 } // namespace net 485 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/proxy/proxy_script_decider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698