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

Side by Side Diff: components/safe_browsing_db/v4_get_hash_protocol_manager.cc

Issue 2353413002: Store list information in ListInfo (was: StoreIdAndFIleName) (Closed)
Patch Set: sort the members of ListInfo by member name Created 4 years, 2 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 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 #include "components/safe_browsing_db/v4_get_hash_protocol_manager.h" 5 #include "components/safe_browsing_db/v4_get_hash_protocol_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base64url.h" 9 #include "base/base64url.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 const V4ProtocolConfig& config) 233 const V4ProtocolConfig& config)
234 : gethash_error_count_(0), 234 : gethash_error_count_(0),
235 gethash_back_off_mult_(1), 235 gethash_back_off_mult_(1),
236 next_gethash_time_(Time::FromDoubleT(0)), 236 next_gethash_time_(Time::FromDoubleT(0)),
237 config_(config), 237 config_(config),
238 request_context_getter_(request_context_getter), 238 request_context_getter_(request_context_getter),
239 url_fetcher_id_(0), 239 url_fetcher_id_(0),
240 clock_(new base::DefaultClock()) { 240 clock_(new base::DefaultClock()) {
241 DCHECK(!stores_to_request.empty()); 241 DCHECK(!stores_to_request.empty());
242 for (const ListIdentifier& store : stores_to_request) { 242 for (const ListIdentifier& store : stores_to_request) {
243 platform_types_.insert(store.platform_type); 243 platform_types_.insert(store.platform_type());
244 threat_entry_types_.insert(store.threat_entry_type); 244 threat_entry_types_.insert(store.threat_entry_type());
245 threat_types_.insert(store.threat_type); 245 threat_types_.insert(store.threat_type());
246 } 246 }
247 } 247 }
248 248
249 V4GetHashProtocolManager::~V4GetHashProtocolManager() {} 249 V4GetHashProtocolManager::~V4GetHashProtocolManager() {}
250 250
251 void V4GetHashProtocolManager::ClearCache() { 251 void V4GetHashProtocolManager::ClearCache() {
252 DCHECK(CalledOnValidThread()); 252 DCHECK(CalledOnValidThread());
253 full_hash_cache_.clear(); 253 full_hash_cache_.clear();
254 } 254 }
255 255
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 std::ostream& operator<<(std::ostream& os, const FullHashInfo& fhi) { 739 std::ostream& operator<<(std::ostream& os, const FullHashInfo& fhi) {
740 os << "{full_hash: " << fhi.full_hash << "; list_id: " << fhi.list_id 740 os << "{full_hash: " << fhi.full_hash << "; list_id: " << fhi.list_id
741 << "; positive_expiry: " << fhi.positive_expiry 741 << "; positive_expiry: " << fhi.positive_expiry
742 << "; metadata.api_permissions.size(): " 742 << "; metadata.api_permissions.size(): "
743 << fhi.metadata.api_permissions.size() << "}"; 743 << fhi.metadata.api_permissions.size() << "}";
744 return os; 744 return os;
745 } 745 }
746 #endif 746 #endif
747 747
748 } // namespace safe_browsing 748 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698