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 should return whether a request was actually issued in | |
19 // response to this call. If so, then InformOfNetworkRequestComplete() must be | |
20 // called once request is complete. | |
mmenke
2015/01/21 17:18:52
And if not?
engedy
2015/01/23 22:09:43
Done.
| |
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 |