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 | |
michael@0 | 2 | /* |
michael@0 | 3 | * Copyright 2006 The Android Open Source Project |
michael@0 | 4 | * |
michael@0 | 5 | * Use of this source code is governed by a BSD-style license that can be |
michael@0 | 6 | * found in the LICENSE file. |
michael@0 | 7 | */ |
michael@0 | 8 | |
michael@0 | 9 | |
michael@0 | 10 | #ifndef SkDisplayAdd_DEFINED |
michael@0 | 11 | #define SkDisplayAdd_DEFINED |
michael@0 | 12 | |
michael@0 | 13 | #include "SkDrawable.h" |
michael@0 | 14 | #include "SkMemberInfo.h" |
michael@0 | 15 | |
michael@0 | 16 | class SkAdd : public SkDrawable { |
michael@0 | 17 | DECLARE_MEMBER_INFO(Add); |
michael@0 | 18 | SkAdd(); |
michael@0 | 19 | |
michael@0 | 20 | enum Mode { |
michael@0 | 21 | kMode_indirect, |
michael@0 | 22 | kMode_immediate |
michael@0 | 23 | }; |
michael@0 | 24 | |
michael@0 | 25 | virtual SkDisplayable* deepCopy(SkAnimateMaker* ); |
michael@0 | 26 | virtual bool draw(SkAnimateMaker& ); |
michael@0 | 27 | #ifdef SK_DUMP_ENABLED |
michael@0 | 28 | virtual void dump(SkAnimateMaker* ); |
michael@0 | 29 | #endif |
michael@0 | 30 | virtual bool enable(SkAnimateMaker& ); |
michael@0 | 31 | virtual bool hasEnable() const; |
michael@0 | 32 | virtual void initialize(); |
michael@0 | 33 | virtual bool isDrawable() const; |
michael@0 | 34 | protected: |
michael@0 | 35 | // struct _A { |
michael@0 | 36 | Mode mode; |
michael@0 | 37 | int32_t offset; |
michael@0 | 38 | SkDrawable* use; |
michael@0 | 39 | SkDrawable* where; // if NULL, offset becomes index |
michael@0 | 40 | // } A; |
michael@0 | 41 | private: |
michael@0 | 42 | typedef SkDrawable INHERITED; |
michael@0 | 43 | }; |
michael@0 | 44 | |
michael@0 | 45 | class SkClear : public SkDisplayable { |
michael@0 | 46 | virtual bool enable(SkAnimateMaker& ); |
michael@0 | 47 | }; |
michael@0 | 48 | |
michael@0 | 49 | class SkMove : public SkAdd { |
michael@0 | 50 | DECLARE_MEMBER_INFO(Move); |
michael@0 | 51 | private: |
michael@0 | 52 | typedef SkAdd INHERITED; |
michael@0 | 53 | }; |
michael@0 | 54 | |
michael@0 | 55 | class SkRemove : public SkAdd { |
michael@0 | 56 | DECLARE_MEMBER_INFO(Remove); |
michael@0 | 57 | SkRemove(); |
michael@0 | 58 | protected: |
michael@0 | 59 | SkBool fDelete; |
michael@0 | 60 | private: |
michael@0 | 61 | friend class SkAdd; |
michael@0 | 62 | typedef SkAdd INHERITED; |
michael@0 | 63 | }; |
michael@0 | 64 | |
michael@0 | 65 | class SkReplace : public SkAdd { |
michael@0 | 66 | DECLARE_MEMBER_INFO(Replace); |
michael@0 | 67 | private: |
michael@0 | 68 | typedef SkAdd INHERITED; |
michael@0 | 69 | }; |
michael@0 | 70 | |
michael@0 | 71 | #endif // SkDisplayAdd_DEFINED |