Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1078)

Side by Side Diff: net/base/sdch_observer.h

Issue 664263002: Restructure SDCH layering to allow more separation (observer/1->[0,n] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Results of self review. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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,
24 const GURL& request_url,
25 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
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();
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.
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_;
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
43 };
44
45 } // namespace net
46
47 #endif // NET_BASE_SDCH_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698