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

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

Issue 2132563003: Implement origin-based deletion for the domain reliability service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated DomainReliabilityMonitorTest Created 4 years, 5 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_MONITOR_H_ 5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_
6 #define COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_ 6 #define COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Should be called when |request| is complete. Will examine and possibly 104 // Should be called when |request| is complete. Will examine and possibly
105 // log the (final) request. |started| should be true if the request was 105 // log the (final) request. |started| should be true if the request was
106 // actually started before it was terminated. Must be called after 106 // actually started before it was terminated. Must be called after
107 // |SetDiscardUploads|. 107 // |SetDiscardUploads|.
108 void OnCompleted(net::URLRequest* request, bool started); 108 void OnCompleted(net::URLRequest* request, bool started);
109 109
110 // net::NetworkChangeNotifier::NetworkChangeObserver implementation: 110 // net::NetworkChangeNotifier::NetworkChangeObserver implementation:
111 void OnNetworkChanged( 111 void OnNetworkChanged(
112 net::NetworkChangeNotifier::ConnectionType type) override; 112 net::NetworkChangeNotifier::ConnectionType type) override;
113 113
114 // Called to remove browsing data. With CLEAR_BEACONS, leaves contexts in 114 // Called to remove browsing data for origins matched by |origin_filter|.
115 // place but clears beacons (which betray browsing history); with 115 // With CLEAR_BEACONS, leaves contexts in place but clears beacons (which
116 // CLEAR_CONTEXTS, removes all contexts (which can behave as cookies). 116 // betray browsing history); with CLEAR_CONTEXTS, removes entire contexts
117 void ClearBrowsingData(DomainReliabilityClearMode mode); 117 // (which can behave as cookies). A null |origin_filter| is interpreted
118 // as an always-true filter, indicating complete deletion.
119 void ClearBrowsingData(
120 DomainReliabilityClearMode mode,
121 const base::Callback<bool(const GURL&)>& origin_filter);
118 122
119 // Gets a Value containing data that can be formatted into a web page for 123 // Gets a Value containing data that can be formatted into a web page for
120 // debugging purposes. 124 // debugging purposes.
121 std::unique_ptr<base::Value> GetWebUIData() const; 125 std::unique_ptr<base::Value> GetWebUIData() const;
122 126
123 DomainReliabilityContext* AddContextForTesting( 127 DomainReliabilityContext* AddContextForTesting(
124 std::unique_ptr<const DomainReliabilityConfig> config); 128 std::unique_ptr<const DomainReliabilityConfig> config);
125 129
126 size_t contexts_size_for_testing() const { 130 size_t contexts_size_for_testing() const {
127 return context_manager_.contexts_size_for_testing(); 131 return context_manager_.contexts_size_for_testing();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 bool discard_uploads_set_; 189 bool discard_uploads_set_;
186 190
187 base::WeakPtrFactory<DomainReliabilityMonitor> weak_factory_; 191 base::WeakPtrFactory<DomainReliabilityMonitor> weak_factory_;
188 192
189 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityMonitor); 193 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityMonitor);
190 }; 194 };
191 195
192 } // namespace domain_reliability 196 } // namespace domain_reliability
193 197
194 #endif // COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_ 198 #endif // COMPONENTS_DOMAIN_RELIABILITY_MONITOR_H_
OLDNEW
« no previous file with comments | « components/domain_reliability/context_manager.cc ('k') | components/domain_reliability/monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698