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) 2002-2010 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 _EXTENSION_BEHAVIOR_INCLUDED_ |
michael@0 | 8 | #define _EXTENSION_BEHAVIOR_INCLUDED_ |
michael@0 | 9 | |
michael@0 | 10 | #include <map> |
michael@0 | 11 | #include <string> |
michael@0 | 12 | |
michael@0 | 13 | typedef enum |
michael@0 | 14 | { |
michael@0 | 15 | EBhRequire, |
michael@0 | 16 | EBhEnable, |
michael@0 | 17 | EBhWarn, |
michael@0 | 18 | EBhDisable, |
michael@0 | 19 | EBhUndefined |
michael@0 | 20 | } TBehavior; |
michael@0 | 21 | |
michael@0 | 22 | inline const char* getBehaviorString(TBehavior b) |
michael@0 | 23 | { |
michael@0 | 24 | switch(b) |
michael@0 | 25 | { |
michael@0 | 26 | case EBhRequire: return "require"; |
michael@0 | 27 | case EBhEnable: return "enable"; |
michael@0 | 28 | case EBhWarn: return "warn"; |
michael@0 | 29 | case EBhDisable: return "disable"; |
michael@0 | 30 | default: return NULL; |
michael@0 | 31 | } |
michael@0 | 32 | } |
michael@0 | 33 | |
michael@0 | 34 | // Mapping between extension name and behavior. |
michael@0 | 35 | typedef std::map<std::string, TBehavior> TExtensionBehavior; |
michael@0 | 36 | |
michael@0 | 37 | #endif // _EXTENSION_TABLE_INCLUDED_ |