Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_mobilemessage_SmsMessage_h
7 #define mozilla_dom_mobilemessage_SmsMessage_h
9 #include "mozilla/dom/mobilemessage/SmsTypes.h"
10 #include "nsIDOMMozSmsMessage.h"
11 #include "nsString.h"
12 #include "mozilla/dom/mobilemessage/Types.h"
13 #include "mozilla/Attributes.h"
15 namespace mozilla {
16 namespace dom {
18 class SmsMessage MOZ_FINAL : public nsIDOMMozSmsMessage
19 {
20 public:
21 NS_DECL_ISUPPORTS
22 NS_DECL_NSIDOMMOZSMSMESSAGE
24 SmsMessage(int32_t aId,
25 uint64_t aThreadId,
26 const nsString& aIccId,
27 mobilemessage::DeliveryState aDelivery,
28 mobilemessage::DeliveryStatus aDeliveryStatus,
29 const nsString& aSender,
30 const nsString& aReceiver,
31 const nsString& aBody,
32 mobilemessage::MessageClass aMessageClass,
33 uint64_t aTimestamp,
34 uint64_t aSentTimestamp,
35 uint64_t aDeliveryTimestamp,
36 bool aRead);
38 SmsMessage(const mobilemessage::SmsMessageData& aData);
40 static nsresult Create(int32_t aId,
41 uint64_t aThreadId,
42 const nsAString& aIccId,
43 const nsAString& aDelivery,
44 const nsAString& aDeliveryStatus,
45 const nsAString& aSender,
46 const nsAString& aReceiver,
47 const nsAString& aBody,
48 const nsAString& aMessageClass,
49 uint64_t aTimestamp,
50 uint64_t aSentTimestamp,
51 uint64_t aDeliveryTimestamp,
52 bool aRead,
53 JSContext* aCx,
54 nsIDOMMozSmsMessage** aMessage);
55 const mobilemessage::SmsMessageData& GetData() const;
57 private:
58 // Don't try to use the default constructor.
59 SmsMessage();
61 mobilemessage::SmsMessageData mData;
62 };
64 } // namespace dom
65 } // namespace mozilla
67 #endif // mozilla_dom_mobilemessage_SmsMessage_h