diff options
author | ellyjones <ellyjones@chromium.org> | 2015-04-03 08:30:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-03 15:31:18 +0000 |
commit | 3e92511b909daf358313d5eb455e65549bd3e459 (patch) | |
tree | 6ca2043dfea642f4a780042665a0816760e6163f /net/sdch/sdch_owner.h | |
parent | 9a44c4f4994164d3108a77d2f780be9dcaee38ce (diff) | |
download | chromium_src-3e92511b909daf358313d5eb455e65549bd3e459.zip chromium_src-3e92511b909daf358313d5eb455e65549bd3e459.tar.gz chromium_src-3e92511b909daf358313d5eb455e65549bd3e459.tar.bz2 |
SDCH: track NetworkBytesSpent in SdchOwner
To do this, add an extra parameter to SdchDictionaryFetcher::OnDictionaryFetchedCallback and SdchOwner::OnDictionaryFetched,
which indicates whether the fetched dictionary was served from cache or not. If this parameter indicates a network load, have SdchOwner
histogram the size of the received dictionary.
Also, add unit tests covering this behavior.
BUG=465873
Review URL: https://codereview.chromium.org/1050193002
Cr-Commit-Position: refs/heads/master@{#323745}
Diffstat (limited to 'net/sdch/sdch_owner.h')
-rw-r--r-- | net/sdch/sdch_owner.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sdch/sdch_owner.h b/net/sdch/sdch_owner.h index 1655275..053eecd 100644 --- a/net/sdch/sdch_owner.h +++ b/net/sdch/sdch_owner.h @@ -68,16 +68,16 @@ class NET_EXPORT SdchOwner : public net::SdchObserver, void OnPrefValueChanged(const std::string& key) override; void OnInitializationCompleted(bool succeeded) override; - // Implementation detail--this is the function callback by the callback - // passed to the fetcher through which the fetcher informs the SdchOwner - // that it's gotten the dictionary. The first two arguments are - // bound locally. + // Implementation detail--this is the function callback by the callback passed + // to the fetcher through which the fetcher informs the SdchOwner that it's + // gotten the dictionary. The first two arguments are bound locally. // Public for testing. void OnDictionaryFetched(base::Time last_used, int use_count, const std::string& dictionary_text, const GURL& dictionary_url, - const net::BoundNetLog& net_log); + const net::BoundNetLog& net_log, + bool was_from_cache); void SetClockForTesting(scoped_ptr<base::Clock> clock); |