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.
michael@0 | 1 | // |
michael@0 | 2 | // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. |
michael@0 | 3 | // Use of this source code is governed by a BSD-style license that can be |
michael@0 | 4 | // found in the LICENSE file. |
michael@0 | 5 | // |
michael@0 | 6 | |
michael@0 | 7 | #ifndef COMPILER_PREPROCESSOR_MACRO_H_ |
michael@0 | 8 | #define COMPILER_PREPROCESSOR_MACRO_H_ |
michael@0 | 9 | |
michael@0 | 10 | #include <map> |
michael@0 | 11 | #include <string> |
michael@0 | 12 | #include <vector> |
michael@0 | 13 | |
michael@0 | 14 | namespace pp |
michael@0 | 15 | { |
michael@0 | 16 | |
michael@0 | 17 | struct Token; |
michael@0 | 18 | |
michael@0 | 19 | struct Macro |
michael@0 | 20 | { |
michael@0 | 21 | enum Type |
michael@0 | 22 | { |
michael@0 | 23 | kTypeObj, |
michael@0 | 24 | kTypeFunc |
michael@0 | 25 | }; |
michael@0 | 26 | typedef std::vector<std::string> Parameters; |
michael@0 | 27 | typedef std::vector<Token> Replacements; |
michael@0 | 28 | |
michael@0 | 29 | Macro() : predefined(false), disabled(false), type(kTypeObj) { } |
michael@0 | 30 | bool equals(const Macro& other) const; |
michael@0 | 31 | |
michael@0 | 32 | bool predefined; |
michael@0 | 33 | mutable bool disabled; |
michael@0 | 34 | |
michael@0 | 35 | Type type; |
michael@0 | 36 | std::string name; |
michael@0 | 37 | Parameters parameters; |
michael@0 | 38 | Replacements replacements; |
michael@0 | 39 | }; |
michael@0 | 40 | |
michael@0 | 41 | typedef std::map<std::string, Macro> MacroSet; |
michael@0 | 42 | |
michael@0 | 43 | } // namespace pp |
michael@0 | 44 | #endif // COMPILER_PREPROCESSOR_MACRO_H_ |