| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // See header file for description of class | 5 // See header file for description of class |
| 6 | 6 |
| 7 #include "chrome/browser/net/dns_host_info.h" | 7 #include "chrome/browser/net/dns_host_info.h" |
| 8 | 8 |
| 9 #include <math.h> | 9 #include <math.h> |
| 10 | 10 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/histogram.h" | 14 #include "base/histogram.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
| 17 | 17 |
| 18 using base::Time; |
| 19 using base::TimeDelta; |
| 20 using base::TimeTicks; |
| 21 |
| 18 namespace chrome_browser_net { | 22 namespace chrome_browser_net { |
| 19 | 23 |
| 20 static bool detailed_logging_enabled = false; | 24 static bool detailed_logging_enabled = false; |
| 21 | 25 |
| 22 // Use command line switch to enable detailed logging. | 26 // Use command line switch to enable detailed logging. |
| 23 void EnableDnsDetailedLog(bool enable) { | 27 void EnableDnsDetailedLog(bool enable) { |
| 24 detailed_logging_enabled = enable; | 28 detailed_logging_enabled = enable; |
| 25 } | 29 } |
| 26 | 30 |
| 27 // static | 31 // static |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 #ifdef DEBUG | 332 #ifdef DEBUG |
| 329 StringAppendF(output, | 333 StringAppendF(output, |
| 330 "Prefetch Queue Durations: min=%d, avg=%d, max=%d<br><br>", | 334 "Prefetch Queue Durations: min=%d, avg=%d, max=%d<br><br>", |
| 331 queue.minimum(), queue.average(), queue.maximum()); | 335 queue.minimum(), queue.average(), queue.maximum()); |
| 332 #endif | 336 #endif |
| 333 | 337 |
| 334 output->append("<br>"); | 338 output->append("<br>"); |
| 335 } | 339 } |
| 336 } // namespace chrome_browser_net | 340 } // namespace chrome_browser_net |
| 337 | 341 |
| OLD | NEW |