Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 382 // Data to POST when doing an update. | 382 // Data to POST when doing an update. |
| 383 std::string update_list_data_; | 383 std::string update_list_data_; |
| 384 | 384 |
| 385 // When true, protocol manager will not start an update unless | 385 // When true, protocol manager will not start an update unless |
| 386 // ForceScheduleNextUpdate() is called. This is set for testing purpose. | 386 // ForceScheduleNextUpdate() is called. This is set for testing purpose. |
| 387 bool disable_auto_update_; | 387 bool disable_auto_update_; |
| 388 | 388 |
| 389 // ID for URLFetchers for testing. | 389 // ID for URLFetchers for testing. |
| 390 int url_fetcher_id_; | 390 int url_fetcher_id_; |
| 391 | 391 |
| 392 #if defined(OS_ANDROID) | |
| 393 // When true, protocol_manager will not check network connection | |
| 394 // type when scheduling next update. This is set for testing purpose. | |
| 395 bool disable_connection_check_; | |
| 396 #endif | |
| 397 | |
|
Scott Hess - ex-Googler
2014/06/25 21:34:33
Could you pull this and the disable_auto_update_ c
| |
| 392 // Whether the app is in foreground or background. | 398 // Whether the app is in foreground or background. |
| 393 bool app_in_foreground_; | 399 bool app_in_foreground_; |
| 394 | 400 |
| 395 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingProtocolManager); | 401 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingProtocolManager); |
| 396 }; | 402 }; |
| 397 | 403 |
| 398 // Interface of a factory to create ProtocolManager. Useful for tests. | 404 // Interface of a factory to create ProtocolManager. Useful for tests. |
| 399 class SBProtocolManagerFactory { | 405 class SBProtocolManagerFactory { |
| 400 public: | 406 public: |
| 401 SBProtocolManagerFactory() {} | 407 SBProtocolManagerFactory() {} |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 439 virtual void AddChunks(const std::string& list, | 445 virtual void AddChunks(const std::string& list, |
| 440 scoped_ptr<ScopedVector<SBChunkData> > chunks, | 446 scoped_ptr<ScopedVector<SBChunkData> > chunks, |
| 441 AddChunksCallback callback) = 0; | 447 AddChunksCallback callback) = 0; |
| 442 | 448 |
| 443 // Delete chunks from the database. | 449 // Delete chunks from the database. |
| 444 virtual void DeleteChunks( | 450 virtual void DeleteChunks( |
| 445 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) = 0; | 451 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) = 0; |
| 446 }; | 452 }; |
| 447 | 453 |
| 448 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ | 454 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ |
| OLD | NEW |