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 SkBoundable_DEFINED |
michael@0 | 11 | #define SkBoundable_DEFINED |
michael@0 | 12 | |
michael@0 | 13 | #include "SkDrawable.h" |
michael@0 | 14 | #include "SkRect.h" |
michael@0 | 15 | |
michael@0 | 16 | class SkBoundable : public SkDrawable { |
michael@0 | 17 | public: |
michael@0 | 18 | SkBoundable(); |
michael@0 | 19 | virtual void clearBounder(); |
michael@0 | 20 | virtual void enableBounder(); |
michael@0 | 21 | virtual void getBounds(SkRect* ); |
michael@0 | 22 | bool hasBounds() { return fBounds.fLeft != (int16_t)0x8000U; } |
michael@0 | 23 | void setBounds(SkIRect& bounds) { fBounds = bounds; } |
michael@0 | 24 | protected: |
michael@0 | 25 | void clearBounds() { fBounds.fLeft = (int16_t) SkToU16(0x8000); }; // mark bounds as unset |
michael@0 | 26 | SkIRect fBounds; |
michael@0 | 27 | private: |
michael@0 | 28 | typedef SkDrawable INHERITED; |
michael@0 | 29 | }; |
michael@0 | 30 | |
michael@0 | 31 | class SkBoundableAuto { |
michael@0 | 32 | public: |
michael@0 | 33 | SkBoundableAuto(SkBoundable* boundable, SkAnimateMaker& maker); |
michael@0 | 34 | ~SkBoundableAuto(); |
michael@0 | 35 | private: |
michael@0 | 36 | SkBoundable* fBoundable; |
michael@0 | 37 | SkAnimateMaker& fMaker; |
michael@0 | 38 | SkBoundableAuto& operator= (const SkBoundableAuto& ); |
michael@0 | 39 | }; |
michael@0 | 40 | |
michael@0 | 41 | #endif // SkBoundable_DEFINED |