| OLD | NEW |
| 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/http/http_cache_transaction.h" | 5 #include "net/http/http_cache_transaction.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
| 10 #include <unistd.h> | 10 #include <unistd.h> |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 } | 858 } |
| 859 | 859 |
| 860 int HttpCache::Transaction::DoAddToEntryComplete(int result) { | 860 int HttpCache::Transaction::DoAddToEntryComplete(int result) { |
| 861 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_HTTP_CACHE_ADD_TO_ENTRY, | 861 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_HTTP_CACHE_ADD_TO_ENTRY, |
| 862 result); | 862 result); |
| 863 | 863 |
| 864 const base::TimeDelta entry_lock_wait = | 864 const base::TimeDelta entry_lock_wait = |
| 865 base::TimeTicks::Now() - entry_lock_waiting_since_; | 865 base::TimeTicks::Now() - entry_lock_waiting_since_; |
| 866 UMA_HISTOGRAM_TIMES("HttpCache.EntryLockWait", entry_lock_wait); | 866 UMA_HISTOGRAM_TIMES("HttpCache.EntryLockWait", entry_lock_wait); |
| 867 static const bool prefetching_fieldtrial = | 867 static const bool prefetching_fieldtrial = |
| 868 base::FieldTrialList::Find("Prefetch") && | 868 base::FieldTrialList::TrialExists("Prefetch"); |
| 869 !base::FieldTrialList::Find("Prefetch")->group_name().empty(); | |
| 870 if (prefetching_fieldtrial) { | 869 if (prefetching_fieldtrial) { |
| 871 UMA_HISTOGRAM_TIMES( | 870 UMA_HISTOGRAM_TIMES( |
| 872 base::FieldTrial::MakeName("HttpCache.EntryLockWait", "Prefetch"), | 871 base::FieldTrial::MakeName("HttpCache.EntryLockWait", "Prefetch"), |
| 873 entry_lock_wait); | 872 entry_lock_wait); |
| 874 } | 873 } |
| 875 | 874 |
| 876 entry_lock_waiting_since_ = base::TimeTicks(); | 875 entry_lock_waiting_since_ = base::TimeTicks(); |
| 877 DCHECK(new_entry_); | 876 DCHECK(new_entry_); |
| 878 cache_pending_ = false; | 877 cache_pending_ = false; |
| 879 | 878 |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2000 return false; | 1999 return false; |
| 2001 | 2000 |
| 2002 return true; | 2001 return true; |
| 2003 } | 2002 } |
| 2004 | 2003 |
| 2005 void HttpCache::Transaction::OnIOComplete(int result) { | 2004 void HttpCache::Transaction::OnIOComplete(int result) { |
| 2006 DoLoop(result); | 2005 DoLoop(result); |
| 2007 } | 2006 } |
| 2008 | 2007 |
| 2009 } // namespace net | 2008 } // namespace net |
| OLD | NEW |