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

Side by Side Diff: components/domain_reliability/context.h

Issue 238863005: Domain Reliability: Remove browsing data when requested. (Closed) Base URL: http://git.chromium.org/chromium/src.git@domrel_bakedin
Patch Set: Add unittest Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef COMPONENTS_DOMAIN_RELIABILITY_CONTEXT_H_ 5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_CONTEXT_H_
6 #define COMPONENTS_DOMAIN_RELIABILITY_CONTEXT_H_ 6 #define COMPONENTS_DOMAIN_RELIABILITY_CONTEXT_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 22 matching lines...) Expand all
33 DomainReliabilityContext( 33 DomainReliabilityContext(
34 MockableTime* time, 34 MockableTime* time,
35 const DomainReliabilityScheduler::Params& scheduler_params, 35 const DomainReliabilityScheduler::Params& scheduler_params,
36 DomainReliabilityDispatcher* dispatcher, 36 DomainReliabilityDispatcher* dispatcher,
37 DomainReliabilityUploader* uploader, 37 DomainReliabilityUploader* uploader,
38 scoped_ptr<const DomainReliabilityConfig> config); 38 scoped_ptr<const DomainReliabilityConfig> config);
39 virtual ~DomainReliabilityContext(); 39 virtual ~DomainReliabilityContext();
40 40
41 void AddBeacon(const DomainReliabilityBeacon& beacon, const GURL& url); 41 void AddBeacon(const DomainReliabilityBeacon& beacon, const GURL& url);
42 42
43 // Called to clear browsing data, since beacons are like browsing history.
44 void ClearBeacons();
45
43 void GetQueuedDataForTesting( 46 void GetQueuedDataForTesting(
44 int resource_index, 47 int resource_index,
45 std::vector<DomainReliabilityBeacon>* beacons_out, 48 std::vector<DomainReliabilityBeacon>* beacons_out,
46 int* successful_requests_out, 49 int* successful_requests_out,
47 int* failed_requests_out) const; 50 int* failed_requests_out) const;
48 51
49 const DomainReliabilityConfig& config() { return *config_.get(); } 52 const DomainReliabilityConfig& config() { return *config_.get(); }
50 53
51 // Maximum number of beacons queued per context; if more than this many are 54 // Maximum number of beacons queued per context; if more than this many are
52 // queued; the oldest beacons will be removed. 55 // queued; the oldest beacons will be removed.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 base::TimeTicks last_upload_time_; 131 base::TimeTicks last_upload_time_;
129 132
130 base::WeakPtrFactory<DomainReliabilityContext> weak_factory_; 133 base::WeakPtrFactory<DomainReliabilityContext> weak_factory_;
131 134
132 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityContext); 135 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityContext);
133 }; 136 };
134 137
135 } // namespace domain_reliability 138 } // namespace domain_reliability
136 139
137 #endif // COMPONENTS_DOMAIN_RELIABILITY_CONTEXT_H_ 140 #endif // COMPONENTS_DOMAIN_RELIABILITY_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698