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, |
+ const GURL& request_url, |
+ const GURL& dictionary_url); |
Ryan Sleevi
2014/10/20 22:42:04
Why aren't these pure virtual methods, if this is
Randy Smith (Not in Mondays)
2014/10/21 19:05:37
Ah, this issue :-}. So I'm following where John A
|
+ |
+ // Notification that SDCH has received a request to clear all |
+ // its dictionaries. |
+ virtual void OnClearDictionaries(SdchManager* manager); |
+ |
+ virtual ~SdchObserver(); |
+ SdchObserver(); |
Ryan Sleevi
2014/10/20 22:42:04
STYLE: Why isn't this ctor, dtor, methods?
Randy Smith (Not in Mondays)
2014/10/21 19:05:36
No clue; maybe my fingers slipped? :-}. Fixed.
|
+ |
+ 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_; |
Ryan Sleevi
2014/10/20 22:42:04
This is all sorts of danger zone for me. I need a
Randy Smith (Not in Mondays)
2014/10/21 19:05:36
See response in SdchManager to the dual of this qu
|
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_BASE_SDCH_MANAGER_H_ |