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 2011 Google Inc. |
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 | |
michael@0 | 11 | #ifndef SkEmptyShader_DEFINED |
michael@0 | 12 | #define SkEmptyShader_DEFINED |
michael@0 | 13 | |
michael@0 | 14 | #include "SkShader.h" |
michael@0 | 15 | |
michael@0 | 16 | /** |
michael@0 | 17 | * \class SkEmptyShader |
michael@0 | 18 | * A Shader that always draws nothing. Its setContext always returns false, |
michael@0 | 19 | * so it never expects that its shadeSpan() methods will get called. |
michael@0 | 20 | */ |
michael@0 | 21 | class SK_API SkEmptyShader : public SkShader { |
michael@0 | 22 | public: |
michael@0 | 23 | SkEmptyShader() {} |
michael@0 | 24 | |
michael@0 | 25 | virtual uint32_t getFlags() SK_OVERRIDE; |
michael@0 | 26 | virtual uint8_t getSpan16Alpha() const SK_OVERRIDE; |
michael@0 | 27 | virtual bool setContext(const SkBitmap&, const SkPaint&, |
michael@0 | 28 | const SkMatrix&) SK_OVERRIDE; |
michael@0 | 29 | virtual void shadeSpan(int x, int y, SkPMColor span[], int count) SK_OVERRIDE; |
michael@0 | 30 | virtual void shadeSpan16(int x, int y, uint16_t span[], int count) SK_OVERRIDE; |
michael@0 | 31 | virtual void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count) SK_OVERRIDE; |
michael@0 | 32 | |
michael@0 | 33 | SK_TO_STRING_OVERRIDE() |
michael@0 | 34 | SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkEmptyShader) |
michael@0 | 35 | |
michael@0 | 36 | protected: |
michael@0 | 37 | SkEmptyShader(SkReadBuffer& buffer) : INHERITED(buffer) {} |
michael@0 | 38 | |
michael@0 | 39 | private: |
michael@0 | 40 | typedef SkShader INHERITED; |
michael@0 | 41 | }; |
michael@0 | 42 | |
michael@0 | 43 | #endif |