Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
michael@0 | 2 | // Use of this source code is governed by a BSD-style license that can be |
michael@0 | 3 | // found in the LICENSE file. |
michael@0 | 4 | |
michael@0 | 5 | #ifndef OTS_CFF_H_ |
michael@0 | 6 | #define OTS_CFF_H_ |
michael@0 | 7 | |
michael@0 | 8 | #include "ots.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 ots { |
michael@0 | 15 | |
michael@0 | 16 | struct CFFIndex { |
michael@0 | 17 | CFFIndex() |
michael@0 | 18 | : count(0), off_size(0), offset_to_next(0) {} |
michael@0 | 19 | uint16_t count; |
michael@0 | 20 | uint8_t off_size; |
michael@0 | 21 | std::vector<uint32_t> offsets; |
michael@0 | 22 | uint32_t offset_to_next; |
michael@0 | 23 | }; |
michael@0 | 24 | |
michael@0 | 25 | struct OpenTypeCFF { |
michael@0 | 26 | const uint8_t *data; |
michael@0 | 27 | size_t length; |
michael@0 | 28 | // Name INDEX. This name is used in name.cc as a postscript font name. |
michael@0 | 29 | std::string name; |
michael@0 | 30 | |
michael@0 | 31 | // The number of fonts the file has. |
michael@0 | 32 | size_t font_dict_length; |
michael@0 | 33 | // A map from glyph # to font #. |
michael@0 | 34 | std::map<uint16_t, uint8_t> fd_select; |
michael@0 | 35 | |
michael@0 | 36 | // A list of char strings. |
michael@0 | 37 | std::vector<CFFIndex *> char_strings_array; |
michael@0 | 38 | // A list of Local Subrs associated with FDArrays. Can be empty. |
michael@0 | 39 | std::vector<CFFIndex *> local_subrs_per_font; |
michael@0 | 40 | // A Local Subrs associated with Top DICT. Can be NULL. |
michael@0 | 41 | CFFIndex *local_subrs; |
michael@0 | 42 | }; |
michael@0 | 43 | |
michael@0 | 44 | } // namespace ots |
michael@0 | 45 | |
michael@0 | 46 | #endif // OTS_CFF_H_ |