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

Side by Side Diff: net/base/host_resolver_impl.cc

Issue 6931048: Revert 84197 - Add one-time randomization support for FieldTrial, and the ability to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 | « content/renderer/renderer_main.cc ('k') | net/http/http_cache_transaction.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/base/host_resolver_impl.h" 5 #include "net/base/host_resolver_impl.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <Winsock2.h> 8 #include <Winsock2.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <netdb.h> 10 #include <netdb.h>
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 DNS_HISTOGRAM("DNS.ResolveSpeculativeFail", duration); 547 DNS_HISTOGRAM("DNS.ResolveSpeculativeFail", duration);
548 } 548 }
549 UMA_HISTOGRAM_CUSTOM_ENUMERATION(kOSErrorsForGetAddrinfoHistogramName, 549 UMA_HISTOGRAM_CUSTOM_ENUMERATION(kOSErrorsForGetAddrinfoHistogramName,
550 std::abs(os_error_), 550 std::abs(os_error_),
551 GetAllGetAddrinfoOSErrors()); 551 GetAllGetAddrinfoOSErrors());
552 } 552 }
553 DCHECK_LT(category, static_cast<int>(RESOLVE_MAX)); // Be sure it was set. 553 DCHECK_LT(category, static_cast<int>(RESOLVE_MAX)); // Be sure it was set.
554 554
555 UMA_HISTOGRAM_ENUMERATION("DNS.ResolveCategory", category, RESOLVE_MAX); 555 UMA_HISTOGRAM_ENUMERATION("DNS.ResolveCategory", category, RESOLVE_MAX);
556 556
557 static const bool show_speculative_experiment_histograms = 557 static bool show_speculative_experiment_histograms =
558 base::FieldTrialList::TrialExists("DnsImpact"); 558 base::FieldTrialList::Find("DnsImpact") &&
559 !base::FieldTrialList::Find("DnsImpact")->group_name().empty();
559 if (show_speculative_experiment_histograms) { 560 if (show_speculative_experiment_histograms) {
560 UMA_HISTOGRAM_ENUMERATION( 561 UMA_HISTOGRAM_ENUMERATION(
561 base::FieldTrial::MakeName("DNS.ResolveCategory", "DnsImpact"), 562 base::FieldTrial::MakeName("DNS.ResolveCategory", "DnsImpact"),
562 category, RESOLVE_MAX); 563 category, RESOLVE_MAX);
563 if (RESOLVE_SUCCESS == category) { 564 if (RESOLVE_SUCCESS == category) {
564 DNS_HISTOGRAM(base::FieldTrial::MakeName("DNS.ResolveSuccess", 565 DNS_HISTOGRAM(base::FieldTrial::MakeName("DNS.ResolveSuccess",
565 "DnsImpact"), duration); 566 "DnsImpact"), duration);
566 } 567 }
567 } 568 }
568 static const bool show_parallelism_experiment_histograms = 569 static bool show_parallelism_experiment_histograms =
569 base::FieldTrialList::TrialExists("DnsParallelism"); 570 base::FieldTrialList::Find("DnsParallelism") &&
571 !base::FieldTrialList::Find("DnsParallelism")->group_name().empty();
570 if (show_parallelism_experiment_histograms) { 572 if (show_parallelism_experiment_histograms) {
571 UMA_HISTOGRAM_ENUMERATION( 573 UMA_HISTOGRAM_ENUMERATION(
572 base::FieldTrial::MakeName("DNS.ResolveCategory", "DnsParallelism"), 574 base::FieldTrial::MakeName("DNS.ResolveCategory", "DnsParallelism"),
573 category, RESOLVE_MAX); 575 category, RESOLVE_MAX);
574 if (RESOLVE_SUCCESS == category) { 576 if (RESOLVE_SUCCESS == category) {
575 DNS_HISTOGRAM(base::FieldTrial::MakeName("DNS.ResolveSuccess", 577 DNS_HISTOGRAM(base::FieldTrial::MakeName("DNS.ResolveSuccess",
576 "DnsParallelism"), duration); 578 "DnsParallelism"), duration);
577 } 579 }
578 } 580 }
579 } 581 }
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 additional_resolver_flags_ |= HOST_RESOLVER_LOOPBACK_ONLY; 1424 additional_resolver_flags_ |= HOST_RESOLVER_LOOPBACK_ONLY;
1423 } else { 1425 } else {
1424 additional_resolver_flags_ &= ~HOST_RESOLVER_LOOPBACK_ONLY; 1426 additional_resolver_flags_ &= ~HOST_RESOLVER_LOOPBACK_ONLY;
1425 } 1427 }
1426 #endif 1428 #endif
1427 AbortAllInProgressJobs(); 1429 AbortAllInProgressJobs();
1428 // |this| may be deleted inside AbortAllInProgressJobs(). 1430 // |this| may be deleted inside AbortAllInProgressJobs().
1429 } 1431 }
1430 1432
1431 } // namespace net 1433 } // namespace net
OLDNEW
« no previous file with comments | « content/renderer/renderer_main.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698