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

Side by Side Diff: net/http/http_cache_transaction.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 | « net/base/host_resolver_impl.cc ('k') | net/http/http_network_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/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 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 } 863 }
864 864
865 int HttpCache::Transaction::DoAddToEntryComplete(int result) { 865 int HttpCache::Transaction::DoAddToEntryComplete(int result) {
866 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_HTTP_CACHE_ADD_TO_ENTRY, 866 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_HTTP_CACHE_ADD_TO_ENTRY,
867 result); 867 result);
868 868
869 const base::TimeDelta entry_lock_wait = 869 const base::TimeDelta entry_lock_wait =
870 base::TimeTicks::Now() - entry_lock_waiting_since_; 870 base::TimeTicks::Now() - entry_lock_waiting_since_;
871 UMA_HISTOGRAM_TIMES("HttpCache.EntryLockWait", entry_lock_wait); 871 UMA_HISTOGRAM_TIMES("HttpCache.EntryLockWait", entry_lock_wait);
872 static const bool prefetching_fieldtrial = 872 static const bool prefetching_fieldtrial =
873 base::FieldTrialList::TrialExists("Prefetch"); 873 base::FieldTrialList::Find("Prefetch") &&
874 !base::FieldTrialList::Find("Prefetch")->group_name().empty();
874 if (prefetching_fieldtrial) { 875 if (prefetching_fieldtrial) {
875 UMA_HISTOGRAM_TIMES( 876 UMA_HISTOGRAM_TIMES(
876 base::FieldTrial::MakeName("HttpCache.EntryLockWait", "Prefetch"), 877 base::FieldTrial::MakeName("HttpCache.EntryLockWait", "Prefetch"),
877 entry_lock_wait); 878 entry_lock_wait);
878 } 879 }
879 880
880 entry_lock_waiting_since_ = base::TimeTicks(); 881 entry_lock_waiting_since_ = base::TimeTicks();
881 DCHECK(new_entry_); 882 DCHECK(new_entry_);
882 cache_pending_ = false; 883 cache_pending_ = false;
883 884
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 return false; 2014 return false;
2014 2015
2015 return true; 2016 return true;
2016 } 2017 }
2017 2018
2018 void HttpCache::Transaction::OnIOComplete(int result) { 2019 void HttpCache::Transaction::OnIOComplete(int result) {
2019 DoLoop(result); 2020 DoLoop(result);
2020 } 2021 }
2021 2022
2022 } // namespace net 2023 } // namespace net
OLDNEW
« no previous file with comments | « net/base/host_resolver_impl.cc ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698