Chromium Code Reviews| Index: net/base/sdch_observer.h |
| diff --git a/net/base/sdch_observer.h b/net/base/sdch_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..59c3c77f343dc5ccd2cb7865bccd73be505c7cfb |
| --- /dev/null |
| +++ b/net/base/sdch_observer.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// Observer interface for SDCH. Observers can register with |
| +// the SdchManager to receive notifications of various SDCH events. |
| + |
| +#ifndef NET_BASE_SDCH_OBSERVER_H_ |
| +#define NET_BASE_SDCH_OBSERVER_H_ |
| + |
| +#include "net/base/net_export.h" |
| + |
| +class GURL; |
| + |
| +namespace net { |
| + |
| +class SdchManager; |
| +class URLRequest; |
| + |
| +class NET_EXPORT SdchObserver { |
| + public: |
| + // Notification that SDCH has seen a "Get-Dictionary" header. |
| + 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
|
| + const GURL& request_url, |
| + const GURL& dictionary_url); |
| + |
| + // Notification that SDCH has received a request to clear all |
| + // its dictionaries. |
| + virtual void OnClearDictionaries(SdchManager* manager); |
| + |
| + virtual ~SdchObserver(); |
| + SdchObserver(); |
| + |
| + private: |
| + // Reference count implementation to confirm no reference to |
| + // this class is left on the SdchManager after class destruction. |
| + friend class SdchManager; |
| + |
| + void AddRef(); |
| + void RemoveRef(); |
| + |
| + int reference_count_; |
| +}; |
| + |
| +} // namespace net |
| + |
| +#endif // NET_BASE_SDCH_MANAGER_H_ |