| 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 // The current reason why the backup update request is happening. | 379 // The current reason why the backup update request is happening. |
| 380 BackupUpdateReason backup_update_reason_; | 380 BackupUpdateReason backup_update_reason_; |
| 381 | 381 |
| 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 #if defined(OS_ANDROID) |
| 390 // When true, protocol_manager will not check network connection |
| 391 // type when scheduling next update. This is set for testing purpose. |
| 392 bool disable_connection_check_; |
| 393 #endif |
| 394 |
| 389 // ID for URLFetchers for testing. | 395 // ID for URLFetchers for testing. |
| 390 int url_fetcher_id_; | 396 int url_fetcher_id_; |
| 391 | 397 |
| 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. |
| (...skipping 40 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 |