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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 // The current reason why the backup update request is happening. | 370 // The current reason why the backup update request is happening. |
371 BackupUpdateReason backup_update_reason_; | 371 BackupUpdateReason backup_update_reason_; |
372 | 372 |
373 // Data to POST when doing an update. | 373 // Data to POST when doing an update. |
374 std::string update_list_data_; | 374 std::string update_list_data_; |
375 | 375 |
376 // When true, protocol manager will not start an update unless | 376 // When true, protocol manager will not start an update unless |
377 // ForceScheduleNextUpdate() is called. This is set for testing purpose. | 377 // ForceScheduleNextUpdate() is called. This is set for testing purpose. |
378 bool disable_auto_update_; | 378 bool disable_auto_update_; |
379 | 379 |
380 #if defined(OS_ANDROID) | |
381 // When true, protocol_manager will not check network connection | |
382 // type when scheduling next update. This is set for testing purpose. | |
383 bool disable_connection_check_; | |
384 #endif | |
385 | |
386 // ID for URLFetchers for testing. | 380 // ID for URLFetchers for testing. |
387 int url_fetcher_id_; | 381 int url_fetcher_id_; |
388 | 382 |
389 // Whether the app is in foreground or background. | 383 // Whether the app is in foreground or background. |
390 bool app_in_foreground_; | 384 bool app_in_foreground_; |
391 | 385 |
392 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingProtocolManager); | 386 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingProtocolManager); |
393 }; | 387 }; |
394 | 388 |
395 // Interface of a factory to create ProtocolManager. Useful for tests. | 389 // Interface of a factory to create ProtocolManager. Useful for tests. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 virtual void AddChunks(const std::string& list, | 433 virtual void AddChunks(const std::string& list, |
440 scoped_ptr<ScopedVector<SBChunkData> > chunks, | 434 scoped_ptr<ScopedVector<SBChunkData> > chunks, |
441 AddChunksCallback callback) = 0; | 435 AddChunksCallback callback) = 0; |
442 | 436 |
443 // Delete chunks from the database. | 437 // Delete chunks from the database. |
444 virtual void DeleteChunks( | 438 virtual void DeleteChunks( |
445 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) = 0; | 439 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) = 0; |
446 }; | 440 }; |
447 | 441 |
448 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ | 442 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ |
OLD | NEW |