| OLD | NEW | 
|    1 // Copyright (c) 2010 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 "chrome/browser/net/url_info.h" |    5 #include "chrome/browser/net/url_info.h" | 
|    6  |    6  | 
|    7 #include <math.h> |    7 #include <math.h> | 
|    8  |    8  | 
|    9 #include <algorithm> |    9 #include <algorithm> | 
|   10 #include <string> |   10 #include <string> | 
|   11  |   11  | 
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  113   state_ = old_prequeue_state_; |  113   state_ = old_prequeue_state_; | 
|  114   DLogResultsStats("DNS Prefetch reset to prequeue"); |  114   DLogResultsStats("DNS Prefetch reset to prequeue"); | 
|  115   static const TimeDelta kBoundary = TimeDelta::FromSeconds(2); |  115   static const TimeDelta kBoundary = TimeDelta::FromSeconds(2); | 
|  116   if (queue_duration_ > kBoundary) { |  116   if (queue_duration_ > kBoundary) { | 
|  117     UMA_HISTOGRAM_MEDIUM_TIMES("DNS.QueueRecycledDeltaOver2", |  117     UMA_HISTOGRAM_MEDIUM_TIMES("DNS.QueueRecycledDeltaOver2", | 
|  118                                queue_duration_ - kBoundary); |  118                                queue_duration_ - kBoundary); | 
|  119     return; |  119     return; | 
|  120   } |  120   } | 
|  121   // Make a custom linear histogram for the region from 0 to boundary. |  121   // Make a custom linear histogram for the region from 0 to boundary. | 
|  122   const size_t kBucketCount = 52; |  122   const size_t kBucketCount = 52; | 
|  123   static scoped_refptr<base::Histogram> histogram = |  123   scoped_refptr<base::Histogram> histogram = | 
|  124       base::LinearHistogram::FactoryTimeGet( |  124       base::LinearHistogram::FactoryTimeGet( | 
|  125           "DNS.QueueRecycledUnder2", TimeDelta(), kBoundary, kBucketCount, |  125           "DNS.QueueRecycledUnder2", TimeDelta(), kBoundary, kBucketCount, | 
|  126           base::Histogram::kUmaTargetedHistogramFlag); |  126           base::Histogram::kUmaTargetedHistogramFlag); | 
|  127   histogram->AddTime(queue_duration_); |  127   histogram->AddTime(queue_duration_); | 
|  128 } |  128 } | 
|  129  |  129  | 
|  130 void UrlInfo::SetPendingDeleteState() { |  130 void UrlInfo::SetPendingDeleteState() { | 
|  131   DCHECK(ASSIGNED == state_  || ASSIGNED_BUT_MARKED == state_); |  131   DCHECK(ASSIGNED == state_  || ASSIGNED_BUT_MARKED == state_); | 
|  132   state_ = ASSIGNED_BUT_MARKED; |  132   state_ = ASSIGNED_BUT_MARKED; | 
|  133 } |  133 } | 
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  339  |  339  | 
|  340     case LEARNED_REFERAL_MOTIVATED: |  340     case LEARNED_REFERAL_MOTIVATED: | 
|  341       return RemoveJs(referring_url_.spec()); |  341       return RemoveJs(referring_url_.spec()); | 
|  342  |  342  | 
|  343     default: |  343     default: | 
|  344       return ""; |  344       return ""; | 
|  345   } |  345   } | 
|  346 } |  346 } | 
|  347  |  347  | 
|  348 }  // namespace chrome_browser_net |  348 }  // namespace chrome_browser_net | 
| OLD | NEW |