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 | #include "SkBitmap.h" |
michael@0 | 10 | #include "SkImage.h" |
michael@0 | 11 | #include "SkImageDecoder.h" |
michael@0 | 12 | #include "SkImageEncoder.h" |
michael@0 | 13 | #include "SkMovie.h" |
michael@0 | 14 | |
michael@0 | 15 | class SkColorTable; |
michael@0 | 16 | class SkStream; |
michael@0 | 17 | class SkStreamRewindable; |
michael@0 | 18 | |
michael@0 | 19 | // Empty implementations for SkImageDecoder. |
michael@0 | 20 | |
michael@0 | 21 | SkImageDecoder::SkImageDecoder() {} |
michael@0 | 22 | |
michael@0 | 23 | SkImageDecoder::~SkImageDecoder() {} |
michael@0 | 24 | |
michael@0 | 25 | SkImageDecoder* SkImageDecoder::Factory(SkStreamRewindable*) { |
michael@0 | 26 | return NULL; |
michael@0 | 27 | } |
michael@0 | 28 | |
michael@0 | 29 | void SkImageDecoder::copyFieldsToOther(SkImageDecoder* ) {} |
michael@0 | 30 | |
michael@0 | 31 | bool SkImageDecoder::DecodeFile(const char[], SkBitmap*, SkBitmap::Config, |
michael@0 | 32 | SkImageDecoder::Mode, SkImageDecoder::Format*) { |
michael@0 | 33 | return false; |
michael@0 | 34 | } |
michael@0 | 35 | |
michael@0 | 36 | bool SkImageDecoder::decode(SkStream*, SkBitmap*, SkBitmap::Config, Mode) { |
michael@0 | 37 | return false; |
michael@0 | 38 | } |
michael@0 | 39 | |
michael@0 | 40 | bool SkImageDecoder::DecodeStream(SkStreamRewindable*, SkBitmap*, SkBitmap::Config, |
michael@0 | 41 | SkImageDecoder::Mode, |
michael@0 | 42 | SkImageDecoder::Format*) { |
michael@0 | 43 | return false; |
michael@0 | 44 | } |
michael@0 | 45 | |
michael@0 | 46 | bool SkImageDecoder::DecodeMemory(const void*, size_t, SkBitmap*, |
michael@0 | 47 | SkBitmap::Config, SkImageDecoder::Mode, |
michael@0 | 48 | SkImageDecoder::Format*) { |
michael@0 | 49 | return false; |
michael@0 | 50 | } |
michael@0 | 51 | |
michael@0 | 52 | bool SkImageDecoder::buildTileIndex(SkStreamRewindable*, int *width, int *height) { |
michael@0 | 53 | return false; |
michael@0 | 54 | } |
michael@0 | 55 | |
michael@0 | 56 | bool SkImageDecoder::decodeSubset(SkBitmap*, const SkIRect&, SkBitmap::Config) { |
michael@0 | 57 | return false; |
michael@0 | 58 | } |
michael@0 | 59 | |
michael@0 | 60 | SkImageDecoder::Format SkImageDecoder::getFormat() const { |
michael@0 | 61 | return kUnknown_Format; |
michael@0 | 62 | } |
michael@0 | 63 | |
michael@0 | 64 | SkImageDecoder::Format SkImageDecoder::GetStreamFormat(SkStreamRewindable*) { |
michael@0 | 65 | return kUnknown_Format; |
michael@0 | 66 | } |
michael@0 | 67 | |
michael@0 | 68 | const char* SkImageDecoder::GetFormatName(Format) { |
michael@0 | 69 | return NULL; |
michael@0 | 70 | } |
michael@0 | 71 | |
michael@0 | 72 | SkImageDecoder::Peeker* SkImageDecoder::setPeeker(Peeker*) { |
michael@0 | 73 | return NULL; |
michael@0 | 74 | } |
michael@0 | 75 | |
michael@0 | 76 | SkImageDecoder::Chooser* SkImageDecoder::setChooser(Chooser*) { |
michael@0 | 77 | return NULL; |
michael@0 | 78 | } |
michael@0 | 79 | |
michael@0 | 80 | SkBitmap::Allocator* SkImageDecoder::setAllocator(SkBitmap::Allocator*) { |
michael@0 | 81 | return NULL; |
michael@0 | 82 | } |
michael@0 | 83 | |
michael@0 | 84 | void SkImageDecoder::setSampleSize(int) {} |
michael@0 | 85 | |
michael@0 | 86 | SkBitmap::Config SkImageDecoder::GetDeviceConfig() { |
michael@0 | 87 | return SkBitmap::kNo_Config; |
michael@0 | 88 | } |
michael@0 | 89 | |
michael@0 | 90 | void SkImageDecoder::SetDeviceConfig(SkBitmap::Config) {} |
michael@0 | 91 | |
michael@0 | 92 | bool SkImageDecoder::cropBitmap(SkBitmap*, SkBitmap*, int, int, int, int, int, |
michael@0 | 93 | int, int) { |
michael@0 | 94 | return false; |
michael@0 | 95 | } |
michael@0 | 96 | |
michael@0 | 97 | bool SkImageDecoder::chooseFromOneChoice(SkBitmap::Config, int, int) const { |
michael@0 | 98 | return false; |
michael@0 | 99 | } |
michael@0 | 100 | |
michael@0 | 101 | bool SkImageDecoder::allocPixelRef(SkBitmap*, SkColorTable*) const { |
michael@0 | 102 | return false; |
michael@0 | 103 | } |
michael@0 | 104 | |
michael@0 | 105 | SkBitmap::Config SkImageDecoder::getPrefConfig(SrcDepth, bool) const { |
michael@0 | 106 | return SkBitmap::kNo_Config; |
michael@0 | 107 | } |
michael@0 | 108 | |
michael@0 | 109 | |
michael@0 | 110 | ///////////////////////////////////////////////////////////////////////// |
michael@0 | 111 | |
michael@0 | 112 | // Empty implementation for SkMovie. |
michael@0 | 113 | |
michael@0 | 114 | SkMovie* SkMovie::DecodeStream(SkStreamRewindable* stream) { |
michael@0 | 115 | return NULL; |
michael@0 | 116 | } |
michael@0 | 117 | |
michael@0 | 118 | ///////////////////////////////////////////////////////////////////////// |
michael@0 | 119 | |
michael@0 | 120 | // Empty implementations for SkImageEncoder. |
michael@0 | 121 | |
michael@0 | 122 | SkImageEncoder* SkImageEncoder::Create(Type t) { |
michael@0 | 123 | return NULL; |
michael@0 | 124 | } |
michael@0 | 125 | |
michael@0 | 126 | bool SkImageEncoder::EncodeFile(const char file[], const SkBitmap&, Type, int quality) { |
michael@0 | 127 | return false; |
michael@0 | 128 | } |
michael@0 | 129 | |
michael@0 | 130 | bool SkImageEncoder::EncodeStream(SkWStream*, const SkBitmap&, SkImageEncoder::Type, int) { |
michael@0 | 131 | return false; |
michael@0 | 132 | } |
michael@0 | 133 | |
michael@0 | 134 | SkData* SkImageEncoder::EncodeData(const SkBitmap&, Type, int quality) { |
michael@0 | 135 | return NULL; |
michael@0 | 136 | } |
michael@0 | 137 | |
michael@0 | 138 | bool SkImageEncoder::encodeStream(SkWStream*, const SkBitmap&, int) { |
michael@0 | 139 | return false; |
michael@0 | 140 | } |
michael@0 | 141 | |
michael@0 | 142 | SkData* SkImageEncoder::encodeData(const SkBitmap&, int) { |
michael@0 | 143 | return NULL; |
michael@0 | 144 | } |
michael@0 | 145 | |
michael@0 | 146 | bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, int quality) { |
michael@0 | 147 | return false; |
michael@0 | 148 | } |
michael@0 | 149 | ///////////////////////////////////////////////////////////////////////// |
michael@0 | 150 | |
michael@0 | 151 | // Empty implementation for SkImages. |
michael@0 | 152 | |
michael@0 | 153 | #include "SkImages.h" |
michael@0 | 154 | |
michael@0 | 155 | void SkImages::InitializeFlattenables() {} |