Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 _ref_count(0), | 121 _ref_count(0), |
| 122 own_config_(owns_config ? config : NULL) { | 122 own_config_(owns_config ? config : NULL) { |
| 123 } | 123 } |
| 124 ~VoiceEngineImpl() override { assert(_ref_count.Value() == 0); } | 124 ~VoiceEngineImpl() override { assert(_ref_count.Value() == 0); } |
| 125 | 125 |
| 126 int AddRef(); | 126 int AddRef(); |
| 127 | 127 |
| 128 // This implements the Release() method for all the inherited interfaces. | 128 // This implements the Release() method for all the inherited interfaces. |
| 129 int Release() override; | 129 int Release() override; |
| 130 | 130 |
| 131 private: | 131 // This is *protected* so that FakeVoiceEngine can inherit from the class and |
| 132 // manipulate the reference count. See: fake_voice_engine.h. | |
| 133 protected: | |
| 132 Atomic32 _ref_count; | 134 Atomic32 _ref_count; |
| 133 rtc::scoped_ptr<const Config> own_config_; | 135 rtc::scoped_ptr<const Config> own_config_; |
|
hta-webrtc
2015/10/20 21:29:00
but why is own_config_ left out in the protected r
the sun
2015/10/21 08:29:13
Good catch.
| |
| 134 }; | 136 }; |
| 135 | 137 |
| 136 } // namespace webrtc | 138 } // namespace webrtc |
| 137 | 139 |
| 138 #endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H | 140 #endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_IMPL_H |
| OLD | NEW |