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

Side by Side Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h

Issue 1871783002: Remove the Data Reduction Proxy TLS experiment code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_S TORE_H_ 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_S TORE_H_
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_S TORE_H_ 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_S TORE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 // Override of DataReductionProxyEventStorageDelegate. 61 // Override of DataReductionProxyEventStorageDelegate.
62 // Put |entry| on a deque of events to store and set |last_bypass_event_| and 62 // Put |entry| on a deque of events to store and set |last_bypass_event_| and
63 // |expiration_ticks_| 63 // |expiration_ticks_|
64 void AddAndSetLastBypassEvent(std::unique_ptr<base::Value> entry, 64 void AddAndSetLastBypassEvent(std::unique_ptr<base::Value> entry,
65 int64_t expiration_ticks) override; 65 int64_t expiration_ticks) override;
66 66
67 // Returns the list of proxy servers for HTTP origins. 67 // Returns the list of proxy servers for HTTP origins.
68 std::string GetHttpProxyList() const; 68 std::string GetHttpProxyList() const;
69 69
70 // Returns the list of proxy servers for HTTPS origins.
71 std::string GetHttpsProxyList() const;
72
73 // Returns a sanitized version of the last seen bypass event. 70 // Returns a sanitized version of the last seen bypass event.
74 std::string SanitizedLastBypassEvent() const; 71 std::string SanitizedLastBypassEvent() const;
75 72
76 private: 73 private:
77 friend class DataReductionProxyEventStoreTest; 74 friend class DataReductionProxyEventStoreTest;
78 75
79 // A deque of data reduction proxy related events. It is used as a circular 76 // A deque of data reduction proxy related events. It is used as a circular
80 // buffer to prevent unbounded memory utilization. 77 // buffer to prevent unbounded memory utilization.
81 std::deque<base::Value*> stored_events_; 78 std::deque<base::Value*> stored_events_;
82 // Whether the data reduction proxy is enabled or not. 79 // Whether the data reduction proxy is enabled or not.
83 bool enabled_; 80 bool enabled_;
84 // The current data reduction proxy configuration. 81 // The current data reduction proxy configuration.
85 std::unique_ptr<base::Value> current_configuration_; 82 std::unique_ptr<base::Value> current_configuration_;
86 // The state based on the last secure proxy check. 83 // The state based on the last secure proxy check.
87 SecureProxyCheckState secure_proxy_check_state_; 84 SecureProxyCheckState secure_proxy_check_state_;
88 // The last seen data reduction proxy bypass event. 85 // The last seen data reduction proxy bypass event.
89 std::unique_ptr<base::Value> last_bypass_event_; 86 std::unique_ptr<base::Value> last_bypass_event_;
90 // The expiration time of the |last_bypass_event_|. 87 // The expiration time of the |last_bypass_event_|.
91 int64_t expiration_ticks_; 88 int64_t expiration_ticks_;
92 89
93 // Enforce usage on the UI thread. 90 // Enforce usage on the UI thread.
94 base::ThreadChecker thread_checker_; 91 base::ThreadChecker thread_checker_;
95 92
96 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyEventStore); 93 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyEventStore);
97 }; 94 };
98 95
99 } // namespace data_reduction_proxy 96 } // namespace data_reduction_proxy
100 97
101 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVEN T_STORE_H_ 98 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVEN T_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698