Index: components/domain_reliability/context.h |
diff --git a/components/domain_reliability/context.h b/components/domain_reliability/context.h |
index 528c8ab168721174099e89acf9c9b4acaac63621..564e4b395569ce8b64b2a6448636b084a701fd86 100644 |
--- a/components/domain_reliability/context.h |
+++ b/components/domain_reliability/context.h |
@@ -53,7 +53,7 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityContext { |
// Notifies the context of a beacon on its domain(s); may or may not save the |
// actual beacon to be uploaded, depending on the sample rates in the config, |
// but will increment one of the request counters in any case. |
- void OnBeacon(const GURL& url, const DomainReliabilityBeacon& beacon); |
+ void OnBeacon(scoped_ptr<DomainReliabilityBeacon> beacon); |
// Called to clear browsing data, since beacons are like browsing history. |
void ClearBeacons(); |
@@ -63,12 +63,7 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityContext { |
scoped_ptr<base::Value> GetWebUIData() const; |
void GetQueuedBeaconsForTesting( |
- std::vector<DomainReliabilityBeacon>* beacons_out) const; |
- |
- void GetRequestCountsForTesting( |
- size_t resource_index, |
- uint32* successful_requests_out, |
- uint32* failed_requests_out) const; |
+ std::vector<const DomainReliabilityBeacon*>* beacons_out) const; |
davidben
2015/10/20 23:35:54
What is the lifetime story for these pointers? (Sh
Deprecated (see juliatuttle)
2015/10/26 19:08:41
Done.
|
const DomainReliabilityConfig& config() const { return *config_.get(); } |
@@ -77,18 +72,16 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityContext { |
static const size_t kMaxQueuedBeacons; |
private: |
- class ResourceState; |
- |
- typedef std::deque<DomainReliabilityBeacon> BeaconDeque; |
- typedef ScopedVector<ResourceState> ResourceStateVector; |
- typedef ResourceStateVector::const_iterator ResourceStateIterator; |
+ typedef std::deque<DomainReliabilityBeacon*> BeaconDeque; |
+ typedef BeaconDeque::iterator BeaconIterator; |
+ typedef BeaconDeque::const_iterator BeaconConstIterator; |
davidben
2015/10/20 23:35:54
Nit: I don't think BeaconConstIterator is used at
Deprecated (see juliatuttle)
2015/10/26 19:08:41
Done.
|
- void InitializeResourceStates(); |
void ScheduleUpload(base::TimeDelta min_delay, base::TimeDelta max_delay); |
void StartUpload(); |
void OnUploadComplete(const DomainReliabilityUploader::UploadResult& result); |
- scoped_ptr<const base::Value> CreateReport(base::TimeTicks upload_time) const; |
+ scoped_ptr<const base::Value> CreateReport(base::TimeTicks upload_time, |
+ const GURL& collector_url) const; |
// Remembers the current state of the context when an upload starts. Can be |
// called multiple times in a row (without |CommitUpload|) if uploads fail |
@@ -114,9 +107,6 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityContext { |
BeaconDeque beacons_; |
size_t uploading_beacons_size_; |
- // Each ResourceState in |states_| corresponds to the Resource of the same |
- // index in the config. |
- ResourceStateVector states_; |
base::TimeTicks upload_time_; |
base::TimeTicks last_upload_time_; |
// The last network change time is not tracked per-context, so this is a |