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

Side by Side Diff: chrome/browser/safe_browsing/protocol_manager.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_
7 7
8 // A class that implements Chrome's interface with the SafeBrowsing protocol. 8 // A class that implements Chrome's interface with the SafeBrowsing protocol.
9 // See https://developers.google.com/safe-browsing/developers_guide_v2 for 9 // See https://developers.google.com/safe-browsing/developers_guide_v2 for
10 // protocol details. 10 // protocol details.
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 // Multiplier between 0 and 1 to spread clients over an interval. 315 // Multiplier between 0 and 1 to spread clients over an interval.
316 float back_off_fuzz_; 316 float back_off_fuzz_;
317 317
318 // The list for which we are make a request. 318 // The list for which we are make a request.
319 std::string list_name_; 319 std::string list_name_;
320 320
321 // For managing the next earliest time to query the SafeBrowsing servers for 321 // For managing the next earliest time to query the SafeBrowsing servers for
322 // updates. 322 // updates.
323 base::TimeDelta next_update_interval_; 323 base::TimeDelta next_update_interval_;
324 base::OneShotTimer<SafeBrowsingProtocolManager> update_timer_; 324 base::OneShotTimer update_timer_;
325 325
326 // timeout_timer_ is used to interrupt update requests which are taking 326 // timeout_timer_ is used to interrupt update requests which are taking
327 // too long. 327 // too long.
328 base::OneShotTimer<SafeBrowsingProtocolManager> timeout_timer_; 328 base::OneShotTimer timeout_timer_;
329 329
330 // All chunk requests that need to be made. 330 // All chunk requests that need to be made.
331 std::deque<ChunkUrl> chunk_request_urls_; 331 std::deque<ChunkUrl> chunk_request_urls_;
332 332
333 HashRequests hash_requests_; 333 HashRequests hash_requests_;
334 334
335 // The next scheduled update has special behavior for the first 2 requests. 335 // The next scheduled update has special behavior for the first 2 requests.
336 enum UpdateRequestState { 336 enum UpdateRequestState {
337 FIRST_REQUEST = 0, 337 FIRST_REQUEST = 0,
338 SECOND_REQUEST, 338 SECOND_REQUEST,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 virtual void AddChunks(const std::string& list, 447 virtual void AddChunks(const std::string& list,
448 scoped_ptr<ScopedVector<SBChunkData> > chunks, 448 scoped_ptr<ScopedVector<SBChunkData> > chunks,
449 AddChunksCallback callback) = 0; 449 AddChunksCallback callback) = 0;
450 450
451 // Delete chunks from the database. 451 // Delete chunks from the database.
452 virtual void DeleteChunks( 452 virtual void DeleteChunks(
453 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) = 0; 453 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) = 0;
454 }; 454 };
455 455
456 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ 456 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698