Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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 // Observer interface for SDCH. Observers can register with | |
| 6 // the SdchManager to receive notifications of various SDCH events. | |
| 7 | |
| 8 #ifndef NET_BASE_SDCH_OBSERVER_H_ | |
| 9 #define NET_BASE_SDCH_OBSERVER_H_ | |
| 10 | |
| 11 #include "net/base/net_export.h" | |
| 12 | |
| 13 class GURL; | |
| 14 | |
| 15 namespace net { | |
| 16 | |
| 17 class SdchManager; | |
| 18 class URLRequest; | |
| 19 | |
| 20 class NET_EXPORT SdchObserver { | |
| 21 public: | |
| 22 // Notification that SDCH has seen a "Get-Dictionary" header. | |
| 23 virtual void OnGetDictionary(SdchManager* manager, | |
|
Randy Smith (Not in Mondays)
2014/10/20 22:16:09
Question for future CLs, not this one: I had origi
| |
| 24 const GURL& request_url, | |
| 25 const GURL& dictionary_url); | |
| 26 | |
| 27 // Notification that SDCH has received a request to clear all | |
| 28 // its dictionaries. | |
| 29 virtual void OnClearDictionaries(SdchManager* manager); | |
| 30 | |
| 31 virtual ~SdchObserver(); | |
| 32 SdchObserver(); | |
| 33 | |
| 34 private: | |
| 35 // Reference count implementation to confirm no reference to | |
| 36 // this class is left on the SdchManager after class destruction. | |
| 37 friend class SdchManager; | |
| 38 | |
| 39 void AddRef(); | |
| 40 void RemoveRef(); | |
| 41 | |
| 42 int reference_count_; | |
| 43 }; | |
| 44 | |
| 45 } // namespace net | |
| 46 | |
| 47 #endif // NET_BASE_SDCH_MANAGER_H_ | |
| OLD | NEW |