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

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

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
OLDNEW
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/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
10 #include "base/synchronization/cancellation_flag.h" 11 #include "base/synchronization/cancellation_flag.h"
11 #include "base/synchronization/waitable_event.h" 12 #include "base/synchronization/waitable_event.h"
12 #include "base/threading/thread.h" 13 #include "base/threading/thread.h"
13 #include "base/threading/thread_restrictions.h" 14 #include "base/threading/thread_restrictions.h"
14 #include "base/values.h" 15 #include "base/values.h"
15 #include "net/base/address_list.h" 16 #include "net/base/address_list.h"
16 #include "net/base/net_errors.h" 17 #include "net/base/net_errors.h"
17 #include "net/base/net_log.h" 18 #include "net/base/net_log.h"
18 #include "net/dns/host_resolver.h" 19 #include "net/dns/host_resolver.h"
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 } 711 }
711 712
712 if (!blocking_dns_) { 713 if (!blocking_dns_) {
713 // The worker thread always blocks waiting to see if the result can be 714 // The worker thread always blocks waiting to see if the result can be
714 // serviced from cache before restarting. 715 // serviced from cache before restarting.
715 event_.Signal(); 716 event_.Signal();
716 } 717 }
717 } 718 }
718 719
719 void ProxyResolverV8Tracing::Job::OnDnsOperationComplete(int result) { 720 void ProxyResolverV8Tracing::Job::OnDnsOperationComplete(int result) {
721 // TODO(vadimt): Remove ScopedTracker below once crbug.com/436634 is fixed.
722 tracked_objects::ScopedTracker tracking_profile(
723 FROM_HERE_WITH_EXPLICIT_FUNCTION(
724 "436634 ProxyResolverV8Tracing::Job::OnDnsOperationComplete"));
725
720 CheckIsOnOriginThread(); 726 CheckIsOnOriginThread();
721 727
722 DCHECK(!cancelled_.IsSet()); 728 DCHECK(!cancelled_.IsSet());
723 DCHECK(pending_dns_completed_synchronously_ == (pending_dns_ == NULL)); 729 DCHECK(pending_dns_completed_synchronously_ == (pending_dns_ == NULL));
724 730
725 SaveDnsToLocalCache(pending_dns_host_, pending_dns_op_, result, 731 SaveDnsToLocalCache(pending_dns_host_, pending_dns_op_, result,
726 pending_dns_addresses_); 732 pending_dns_addresses_);
727 pending_dns_ = NULL; 733 pending_dns_ = NULL;
728 734
729 if (blocking_dns_) { 735 if (blocking_dns_) {
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 DCHECK(!set_pac_script_job_.get()); 1007 DCHECK(!set_pac_script_job_.get());
1002 CHECK_EQ(0, num_outstanding_callbacks_); 1008 CHECK_EQ(0, num_outstanding_callbacks_);
1003 1009
1004 set_pac_script_job_ = new Job(this); 1010 set_pac_script_job_ = new Job(this);
1005 set_pac_script_job_->StartSetPacScript(script_data, callback); 1011 set_pac_script_job_->StartSetPacScript(script_data, callback);
1006 1012
1007 return ERR_IO_PENDING; 1013 return ERR_IO_PENDING;
1008 } 1014 }
1009 1015
1010 } // namespace net 1016 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc ('k') | net/quic/congestion_control/cube_root.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698