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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/leak_tracker.h" 8 #include "base/debug/leak_tracker.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } else { 55 } else {
56 LOG(ERROR) << "Invalid switch for host resolver parallelism: " << s; 56 LOG(ERROR) << "Invalid switch for host resolver parallelism: " << s;
57 } 57 }
58 } else { 58 } else {
59 // Set up a field trial to see what impact the total number of concurrent 59 // Set up a field trial to see what impact the total number of concurrent
60 // resolutions have on DNS resolutions. 60 // resolutions have on DNS resolutions.
61 base::FieldTrial::Probability kDivisor = 1000; 61 base::FieldTrial::Probability kDivisor = 1000;
62 // For each option (i.e., non-default), we have a fixed probability. 62 // For each option (i.e., non-default), we have a fixed probability.
63 base::FieldTrial::Probability kProbabilityPerGroup = 100; // 10%. 63 base::FieldTrial::Probability kProbabilityPerGroup = 100; // 10%.
64 64
65 scoped_refptr<base::FieldTrial> trial = 65 scoped_refptr<base::FieldTrial> trial(
66 new base::FieldTrial("DnsParallelism", kDivisor); 66 new base::FieldTrial("DnsParallelism", kDivisor));
67 67
68 // List options with different counts. 68 // List options with different counts.
69 // Firefox limits total to 8 in parallel, and default is currently 50. 69 // Firefox limits total to 8 in parallel, and default is currently 50.
70 int parallel_6 = trial->AppendGroup("parallel_6", kProbabilityPerGroup); 70 int parallel_6 = trial->AppendGroup("parallel_6", kProbabilityPerGroup);
71 int parallel_7 = trial->AppendGroup("parallel_7", kProbabilityPerGroup); 71 int parallel_7 = trial->AppendGroup("parallel_7", kProbabilityPerGroup);
72 int parallel_8 = trial->AppendGroup("parallel_8", kProbabilityPerGroup); 72 int parallel_8 = trial->AppendGroup("parallel_8", kProbabilityPerGroup);
73 int parallel_9 = trial->AppendGroup("parallel_9", kProbabilityPerGroup); 73 int parallel_9 = trial->AppendGroup("parallel_9", kProbabilityPerGroup);
74 int parallel_10 = trial->AppendGroup("parallel_10", kProbabilityPerGroup); 74 int parallel_10 = trial->AppendGroup("parallel_10", kProbabilityPerGroup);
75 int parallel_14 = trial->AppendGroup("parallel_14", kProbabilityPerGroup); 75 int parallel_14 = trial->AppendGroup("parallel_14", kProbabilityPerGroup);
76 int parallel_20 = trial->AppendGroup("parallel_20", kProbabilityPerGroup); 76 int parallel_20 = trial->AppendGroup("parallel_20", kProbabilityPerGroup);
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 net::HostCache* host_cache = 435 net::HostCache* host_cache =
436 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache(); 436 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache();
437 if (host_cache) 437 if (host_cache)
438 host_cache->clear(); 438 host_cache->clear();
439 } 439 }
440 // Clear all of the passively logged data. 440 // Clear all of the passively logged data.
441 // TODO(eroman): this is a bit heavy handed, really all we need to do is 441 // TODO(eroman): this is a bit heavy handed, really all we need to do is
442 // clear the data pertaining to off the record context. 442 // clear the data pertaining to off the record context.
443 globals_->net_log->passive_collector()->Clear(); 443 globals_->net_log->passive_collector()->Clear();
444 } 444 }
OLDNEW
« no previous file with comments | « chrome/browser/in_process_webkit/browser_webkitclient_impl.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698