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

Side by Side Diff: components/safe_browsing_db/v4_update_protocol_manager.h

Issue 1853833002: Added a test for success after one backoff (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v4_02_init_update
Patch Set: git fetch && pull && bring back checks for update_error_count_ 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
« no previous file with comments | « no previous file | components/safe_browsing_db/v4_update_protocol_manager_unittest.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 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
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
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_
OLDNEW
« no previous file with comments | « no previous file | components/safe_browsing_db/v4_update_protocol_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698