| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_resolver_v8_tracing.h" | 5 #include "net/proxy/proxy_resolver_v8_tracing.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
| 9 #include "base/profiler/scoped_tracker.h" | 9 #include "base/profiler/scoped_tracker.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 } | 715 } |
| 716 | 716 |
| 717 if (!blocking_dns_) { | 717 if (!blocking_dns_) { |
| 718 // The worker thread always blocks waiting to see if the result can be | 718 // The worker thread always blocks waiting to see if the result can be |
| 719 // serviced from cache before restarting. | 719 // serviced from cache before restarting. |
| 720 event_.Signal(); | 720 event_.Signal(); |
| 721 } | 721 } |
| 722 } | 722 } |
| 723 | 723 |
| 724 void ProxyResolverV8Tracing::Job::OnDnsOperationComplete(int result) { | 724 void ProxyResolverV8Tracing::Job::OnDnsOperationComplete(int result) { |
| 725 // TODO(vadimt): Remove ScopedTracker below once crbug.com/436634 is fixed. | |
| 726 tracked_objects::ScopedTracker tracking_profile( | |
| 727 FROM_HERE_WITH_EXPLICIT_FUNCTION( | |
| 728 "436634 ProxyResolverV8Tracing::Job::OnDnsOperationComplete")); | |
| 729 | |
| 730 CheckIsOnOriginThread(); | 725 CheckIsOnOriginThread(); |
| 731 | 726 |
| 732 DCHECK(!cancelled_.IsSet()); | 727 DCHECK(!cancelled_.IsSet()); |
| 733 DCHECK(pending_dns_completed_synchronously_ == (pending_dns_ == NULL)); | 728 DCHECK(pending_dns_completed_synchronously_ == (pending_dns_ == NULL)); |
| 734 | 729 |
| 735 SaveDnsToLocalCache(pending_dns_host_, pending_dns_op_, result, | 730 SaveDnsToLocalCache(pending_dns_host_, pending_dns_op_, result, |
| 736 pending_dns_addresses_); | 731 pending_dns_addresses_); |
| 737 pending_dns_ = NULL; | 732 pending_dns_ = NULL; |
| 738 | 733 |
| 739 if (!parent_->on_load_state_changed_.is_null() && | 734 if (!parent_->on_load_state_changed_.is_null() && |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 DCHECK(!set_pac_script_job_.get()); | 1029 DCHECK(!set_pac_script_job_.get()); |
| 1035 CHECK_EQ(0, num_outstanding_callbacks_); | 1030 CHECK_EQ(0, num_outstanding_callbacks_); |
| 1036 | 1031 |
| 1037 set_pac_script_job_ = new Job(this); | 1032 set_pac_script_job_ = new Job(this); |
| 1038 set_pac_script_job_->StartSetPacScript(script_data, callback); | 1033 set_pac_script_job_->StartSetPacScript(script_data, callback); |
| 1039 | 1034 |
| 1040 return ERR_IO_PENDING; | 1035 return ERR_IO_PENDING; |
| 1041 } | 1036 } |
| 1042 | 1037 |
| 1043 } // namespace net | 1038 } // namespace net |
| OLD | NEW |