OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_FETCH_THROTTLER_DEL
EGATE_H_ |
| 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_FETCH_THROTTLER_DEL
EGATE_H_ |
| 7 |
| 8 namespace password_manager { |
| 9 |
| 10 // An interface that users of AffiliationFetchThrottler need to implement to get |
| 11 // notified once it is okay to issue the next network request. |
| 12 class AffiliationFetchThrottlerDelegate { |
| 13 public: |
| 14 // Will be called once the throttling policy allows issuing a network request, |
| 15 // provided SignalNetworkRequestNeeded() has been called at least once since |
| 16 // the last request. |
| 17 // |
| 18 // The implementation must return true if a request was actually issued in |
| 19 // response to this call, and then call InformOfNetworkRequestComplete() once |
| 20 // the request is complete. Otherwise, the implementation must return false. |
| 21 virtual bool OnCanSendNetworkRequest() = 0; |
| 22 |
| 23 protected: |
| 24 virtual ~AffiliationFetchThrottlerDelegate() {} |
| 25 }; |
| 26 |
| 27 } // namespace password_manager |
| 28 |
| 29 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_FETCH_THROTTLER_
DELEGATE_H_ |
OLD | NEW |