OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SAFE_BROWSING_DB_V4_UPDATE_PROTOCOL_MANAGER_H_ | 5 #ifndef COMPONENTS_SAFE_BROWSING_DB_V4_UPDATE_PROTOCOL_MANAGER_H_ |
6 #define COMPONENTS_SAFE_BROWSING_DB_V4_UPDATE_PROTOCOL_MANAGER_H_ | 6 #define COMPONENTS_SAFE_BROWSING_DB_V4_UPDATE_PROTOCOL_MANAGER_H_ |
7 | 7 |
8 // A class that implements Chrome's interface with the SafeBrowsing V4 update | 8 // A class that implements Chrome's interface with the SafeBrowsing V4 update |
9 // protocol. | 9 // protocol. |
10 // | 10 // |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 const base::hash_map<UpdateListIdentifier, std::string>& | 80 const base::hash_map<UpdateListIdentifier, std::string>& |
81 current_list_states, | 81 current_list_states, |
82 V4UpdateCallback callback); | 82 V4UpdateCallback callback); |
83 | 83 |
84 private: | 84 private: |
85 FRIEND_TEST_ALL_PREFIXES(V4UpdateProtocolManagerTest, | 85 FRIEND_TEST_ALL_PREFIXES(V4UpdateProtocolManagerTest, |
86 TestGetUpdatesErrorHandlingNetwork); | 86 TestGetUpdatesErrorHandlingNetwork); |
87 FRIEND_TEST_ALL_PREFIXES(V4UpdateProtocolManagerTest, | 87 FRIEND_TEST_ALL_PREFIXES(V4UpdateProtocolManagerTest, |
88 TestGetUpdatesErrorHandlingResponseCode); | 88 TestGetUpdatesErrorHandlingResponseCode); |
89 FRIEND_TEST_ALL_PREFIXES(V4UpdateProtocolManagerTest, TestGetUpdatesNoError); | 89 FRIEND_TEST_ALL_PREFIXES(V4UpdateProtocolManagerTest, TestGetUpdatesNoError); |
| 90 FRIEND_TEST_ALL_PREFIXES(V4UpdateProtocolManagerTest, |
| 91 TestGetUpdatesWithOneBackoff); |
90 friend class V4UpdateProtocolManagerFactoryImpl; | 92 friend class V4UpdateProtocolManagerFactoryImpl; |
91 | 93 |
92 // The method to generate the URL for the request to be sent to the server. | 94 // The method to generate the URL for the request to be sent to the server. |
93 // |request_base64| is the base64 encoded form of an instance of the protobuf | 95 // |request_base64| is the base64 encoded form of an instance of the protobuf |
94 // FetchThreatListUpdatesRequest. | 96 // FetchThreatListUpdatesRequest. |
95 GURL GetUpdateUrl(const std::string& request_base64) const; | 97 GURL GetUpdateUrl(const std::string& request_base64) const; |
96 | 98 |
97 // Fills a FetchThreatListUpdatesRequest protocol buffer for a request. | 99 // Fills a FetchThreatListUpdatesRequest protocol buffer for a request. |
98 // Returns the serialized and base 64 encoded request as a string. | 100 // Returns the serialized and base 64 encoded request as a string. |
99 std::string GetBase64SerializedUpdateRequestProto( | 101 std::string GetBase64SerializedUpdateRequestProto( |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 current_list_states, | 189 current_list_states, |
188 V4UpdateCallback callback) = 0; | 190 V4UpdateCallback callback) = 0; |
189 | 191 |
190 private: | 192 private: |
191 DISALLOW_COPY_AND_ASSIGN(V4UpdateProtocolManagerFactory); | 193 DISALLOW_COPY_AND_ASSIGN(V4UpdateProtocolManagerFactory); |
192 }; | 194 }; |
193 | 195 |
194 } // namespace safe_browsing | 196 } // namespace safe_browsing |
195 | 197 |
196 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_UPDATE_PROTOCOL_MANAGER_H_ | 198 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_UPDATE_PROTOCOL_MANAGER_H_ |
OLD | NEW |