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

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: ...and fix BrowsingDataRemoverTet 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
« no previous file with comments | « components/domain_reliability/clear_mode.h ('k') | components/domain_reliability/context.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 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 <vector> 9 #include <vector>
10 10
(...skipping 25 matching lines...) Expand all
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 ~DomainReliabilityContext(); 39 ~DomainReliabilityContext();
40 40
41 // Notifies the context of a beacon on its domain(s); may or may not save the 41 // Notifies the context of a beacon on its domain(s); may or may not save the
42 // actual beacon to be uploaded, depending on the sample rates in the config, 42 // actual beacon to be uploaded, depending on the sample rates in the config,
43 // but will increment one of the request counters in any case. 43 // but will increment one of the request counters in any case.
44 void OnBeacon(const GURL& url, const DomainReliabilityBeacon& beacon); 44 void OnBeacon(const GURL& url, const DomainReliabilityBeacon& beacon);
45 45
46 // Called to clear browsing data, since beacons are like browsing history.
47 void ClearBeacons();
48
46 void GetQueuedDataForTesting( 49 void GetQueuedDataForTesting(
47 size_t resource_index, 50 size_t resource_index,
48 std::vector<DomainReliabilityBeacon>* beacons_out, 51 std::vector<DomainReliabilityBeacon>* beacons_out,
49 uint32* successful_requests_out, 52 uint32* successful_requests_out,
50 uint32* failed_requests_out) const; 53 uint32* failed_requests_out) const;
51 54
52 const DomainReliabilityConfig& config() { return *config_.get(); } 55 const DomainReliabilityConfig& config() { return *config_.get(); }
53 56
54 // Maximum number of beacons queued per context; if more than this many are 57 // Maximum number of beacons queued per context; if more than this many are
55 // queued; the oldest beacons will be removed. 58 // queued; the oldest beacons will be removed.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 base::TimeTicks last_upload_time_; 102 base::TimeTicks last_upload_time_;
100 103
101 base::WeakPtrFactory<DomainReliabilityContext> weak_factory_; 104 base::WeakPtrFactory<DomainReliabilityContext> weak_factory_;
102 105
103 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityContext); 106 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityContext);
104 }; 107 };
105 108
106 } // namespace domain_reliability 109 } // namespace domain_reliability
107 110
108 #endif // COMPONENTS_DOMAIN_RELIABILITY_CONTEXT_H_ 111 #endif // COMPONENTS_DOMAIN_RELIABILITY_CONTEXT_H_
OLDNEW
« no previous file with comments | « components/domain_reliability/clear_mode.h ('k') | components/domain_reliability/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698