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.
1 /*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7 #ifndef SkDQuadImplicit_DEFINED
8 #define SkDQuadImplicit_DEFINED
10 #include "SkPathOpsQuad.h"
12 class SkDQuadImplicit {
13 public:
14 explicit SkDQuadImplicit(const SkDQuad& q);
16 bool match(const SkDQuadImplicit& two) const;
17 static bool Match(const SkDQuad& quad1, const SkDQuad& quad2);
19 double x2() const { return fP[kXx_Coeff]; }
20 double xy() const { return fP[kXy_Coeff]; }
21 double y2() const { return fP[kYy_Coeff]; }
22 double x() const { return fP[kX_Coeff]; }
23 double y() const { return fP[kY_Coeff]; }
24 double c() const { return fP[kC_Coeff]; }
26 private:
27 enum Coeffs {
28 kXx_Coeff,
29 kXy_Coeff,
30 kYy_Coeff,
31 kX_Coeff,
32 kY_Coeff,
33 kC_Coeff,
34 };
36 double fP[kC_Coeff + 1];
37 };
39 #endif