Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef MEDIA_ENGINE_WRAPPER_H_
6 #define MEDIA_ENGINE_WRAPPER_H_
8 #include <mozilla/Scoped.h>
12 namespace mozilla
13 {
14 /**
15 * A Custom scoped template to release a resoure of Type T
16 * with a function of Type F
17 * ScopedCustomReleasePtr<webrtc::VoENetwork> ptr =
18 * webrtc::VoENetwork->GetInterface(voiceEngine);
19 *
20 */
21 template<typename T>
22 struct ScopedCustomReleaseTraits0 : public ScopedFreePtrTraits<T>
23 {
24 static void release(T* ptr)
25 {
26 if(ptr)
27 {
28 (ptr)->Release();
29 }
30 }
31 };
33 SCOPED_TEMPLATE(ScopedCustomReleasePtr, ScopedCustomReleaseTraits0)
34 }//namespace
37 #endif