Skip to content

Commit

Permalink
Remove Cookie.TimeGet
Browse files Browse the repository at this point in the history
BUG=429300

Review URL: https://codereview.chromium.org/726933002

Cr-Commit-Position: refs/heads/master@{#305019}
  • Loading branch information
cbentzel authored and Commit bot committed Nov 20, 2014
1 parent 9c9d7fc commit a1c665d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
7 changes: 0 additions & 7 deletions net/cookies/cookie_monster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1319,16 +1319,12 @@ std::string CookieMonster::GetCookiesWithOptions(const GURL& url,
if (!HasCookieableScheme(url))
return std::string();

TimeTicks start_time(TimeTicks::Now());

std::vector<CanonicalCookie*> cookies;
FindCookiesForHostAndDomain(url, options, true, &cookies);
std::sort(cookies.begin(), cookies.end(), CookieSorter);

std::string cookie_line = BuildCookieLine(cookies);

histogram_time_get_->AddTime(TimeTicks::Now() - start_time);

VLOG(kVlogGetCookies) << "GetCookies() result: " << cookie_line;

return cookie_line;
Expand Down Expand Up @@ -2245,9 +2241,6 @@ void CookieMonster::InitializeHistograms() {
base::Histogram::kUmaTargetedHistogramFlag);

// From UMA_HISTOGRAM_{CUSTOM_,}TIMES
histogram_time_get_ = base::Histogram::FactoryTimeGet("Cookie.TimeGet",
base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(1),
50, base::Histogram::kUmaTargetedHistogramFlag);
histogram_time_blocked_on_load_ = base::Histogram::FactoryTimeGet(
"Cookie.TimeBlockedOnLoad",
base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(1),
Expand Down
1 change: 0 additions & 1 deletion net/cookies/cookie_monster.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,6 @@ class NET_EXPORT CookieMonster : public CookieStore {
base::HistogramBase* histogram_domain_per_etldp1_count_;
base::HistogramBase* histogram_number_duplicate_db_cookies_;
base::HistogramBase* histogram_cookie_deletion_cause_;
base::HistogramBase* histogram_time_get_;
base::HistogramBase* histogram_time_mac_;
base::HistogramBase* histogram_time_blocked_on_load_;

Expand Down
3 changes: 3 additions & 0 deletions tools/metrics/histograms/histograms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3407,6 +3407,9 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</histogram>

<histogram name="Cookie.TimeGet" units="ms">
<obsolete>
Deprecated as of 11/2014.
</obsolete>
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<summary>
The amount of time (ms) to get cookies for each URL request.
Expand Down

0 comments on commit a1c665d

Please sign in to comment.