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 #include "net/base/sdch_observer.h" | |
6 | |
7 #include "base/logging.h" | |
8 | |
9 namespace net { | |
10 | |
11 SdchObserver::SdchObserver() : reference_count_(0) {} | |
12 | |
13 // Null implementations to allow subclasses to received just notifications | |
14 // that they are interested in. | |
Ryan Sleevi
2014/10/20 22:42:04
I'd rather be explicit and force classes to consum
Randy Smith (Not in Mondays)
2014/10/21 19:05:36
Define "our"? This pattern is all through the con
Ryan Sleevi
2014/10/21 23:09:29
See http://google-styleguide.googlecode.com/svn/tr
Randy Smith (Not in Mondays)
2014/10/23 20:57:07
Done.
| |
15 void SdchObserver::OnGetDictionary(SdchManager* manager, | |
16 const GURL& request_url, | |
17 const GURL& dictionary_url) { } | |
18 void SdchObserver::OnClearDictionaries(SdchManager* manager) {} | |
19 | |
20 void SdchObserver::AddRef() { ++reference_count_; } | |
21 | |
22 void SdchObserver::RemoveRef() { --reference_count_; } | |
23 | |
24 SdchObserver::~SdchObserver() { | |
25 // If the reference count is zero, this object is still on an SdchManager's | |
26 // observer list, and so is dangerous to delete. | |
27 DCHECK_EQ(0, reference_count_); | |
28 } | |
29 | |
30 } | |
OLD | NEW |