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

Side by Side Diff: net/http/http_cache_transaction.cc

Issue 6883102: Add one-time randomization support for FieldTrial, and the ability to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. 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::Find("Prefetch") && 873 base::FieldTrialList::TrialExists("Prefetch");
874 !base::FieldTrialList::Find("Prefetch")->group_name().empty();
875 if (prefetching_fieldtrial) { 874 if (prefetching_fieldtrial) {
876 UMA_HISTOGRAM_TIMES( 875 UMA_HISTOGRAM_TIMES(
877 base::FieldTrial::MakeName("HttpCache.EntryLockWait", "Prefetch"), 876 base::FieldTrial::MakeName("HttpCache.EntryLockWait", "Prefetch"),
878 entry_lock_wait); 877 entry_lock_wait);
879 } 878 }
880 879
881 entry_lock_waiting_since_ = base::TimeTicks(); 880 entry_lock_waiting_since_ = base::TimeTicks();
882 DCHECK(new_entry_); 881 DCHECK(new_entry_);
883 cache_pending_ = false; 882 cache_pending_ = false;
884 883
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2014 return false; 2013 return false;
2015 2014
2016 return true; 2015 return true;
2017 } 2016 }
2018 2017
2019 void HttpCache::Transaction::OnIOComplete(int result) { 2018 void HttpCache::Transaction::OnIOComplete(int result) {
2020 DoLoop(result); 2019 DoLoop(result);
2021 } 2020 }
2022 2021
2023 } // namespace net 2022 } // 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