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 | * Copyright (C) 2013-2014 Mozilla Foundation |
michael@0 | 3 | * |
michael@0 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
michael@0 | 5 | * you may not use this file except in compliance with the License. |
michael@0 | 6 | * You may obtain a copy of the License at |
michael@0 | 7 | * |
michael@0 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
michael@0 | 9 | * |
michael@0 | 10 | * Unless required by applicable law or agreed to in writing, software |
michael@0 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
michael@0 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
michael@0 | 13 | * See the License for the specific language governing permissions and |
michael@0 | 14 | * limitations under the License. |
michael@0 | 15 | */ |
michael@0 | 16 | |
michael@0 | 17 | #ifndef DOM_CAMERA_TESTGONKCAMERAHARDWARE_H |
michael@0 | 18 | #define DOM_CAMERA_TESTGONKCAMERAHARDWARE_H |
michael@0 | 19 | |
michael@0 | 20 | #include "GonkCameraHwMgr.h" |
michael@0 | 21 | |
michael@0 | 22 | namespace android { |
michael@0 | 23 | |
michael@0 | 24 | class TestGonkCameraHardware : public android::GonkCameraHardware |
michael@0 | 25 | { |
michael@0 | 26 | public: |
michael@0 | 27 | virtual int AutoFocus() MOZ_OVERRIDE; |
michael@0 | 28 | virtual int StartFaceDetection() MOZ_OVERRIDE; |
michael@0 | 29 | virtual int StopFaceDetection() MOZ_OVERRIDE; |
michael@0 | 30 | virtual int TakePicture() MOZ_OVERRIDE; |
michael@0 | 31 | virtual int StartPreview() MOZ_OVERRIDE; |
michael@0 | 32 | virtual int PushParameters(const mozilla::GonkCameraParameters& aParams) MOZ_OVERRIDE; |
michael@0 | 33 | virtual nsresult PullParameters(mozilla::GonkCameraParameters& aParams) MOZ_OVERRIDE; |
michael@0 | 34 | virtual int StartRecording() MOZ_OVERRIDE; |
michael@0 | 35 | virtual int StopRecording() MOZ_OVERRIDE; |
michael@0 | 36 | virtual int SetListener(const sp<GonkCameraListener>& aListener) MOZ_OVERRIDE; |
michael@0 | 37 | virtual int StoreMetaDataInBuffers(bool aEnabled) MOZ_OVERRIDE; |
michael@0 | 38 | |
michael@0 | 39 | virtual int |
michael@0 | 40 | PushParameters(const CameraParameters& aParams) MOZ_OVERRIDE |
michael@0 | 41 | { |
michael@0 | 42 | return GonkCameraHardware::PushParameters(aParams); |
michael@0 | 43 | } |
michael@0 | 44 | |
michael@0 | 45 | virtual void |
michael@0 | 46 | PullParameters(CameraParameters& aParams) MOZ_OVERRIDE |
michael@0 | 47 | { |
michael@0 | 48 | GonkCameraHardware::PullParameters(aParams); |
michael@0 | 49 | } |
michael@0 | 50 | |
michael@0 | 51 | TestGonkCameraHardware(mozilla::nsGonkCameraControl* aTarget, |
michael@0 | 52 | uint32_t aCameraId, |
michael@0 | 53 | const sp<Camera>& aCamera); |
michael@0 | 54 | virtual ~TestGonkCameraHardware(); |
michael@0 | 55 | |
michael@0 | 56 | virtual nsresult Init() MOZ_OVERRIDE; |
michael@0 | 57 | |
michael@0 | 58 | protected: |
michael@0 | 59 | const nsCString TestCase(); |
michael@0 | 60 | const nsCString GetExtraParameters(); |
michael@0 | 61 | bool IsTestCaseInternal(const char* aTest, const char* aFile, int aLine); |
michael@0 | 62 | int TestCaseError(int aDefaultError); |
michael@0 | 63 | |
michael@0 | 64 | int StartAutoFocusMoving(bool aIsMoving); |
michael@0 | 65 | |
michael@0 | 66 | private: |
michael@0 | 67 | TestGonkCameraHardware(const TestGonkCameraHardware&) MOZ_DELETE; |
michael@0 | 68 | TestGonkCameraHardware& operator=(const TestGonkCameraHardware&) MOZ_DELETE; |
michael@0 | 69 | }; |
michael@0 | 70 | |
michael@0 | 71 | #define IsTestCase(test) IsTestCaseInternal((test), __FILE__, __LINE__) |
michael@0 | 72 | |
michael@0 | 73 | } // namespace android |
michael@0 | 74 | |
michael@0 | 75 | #endif // DOM_CAMERA_TESTGONKCAMERAHARDWARE_H |