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 2010 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 */
8 #ifndef GrRect_DEFINED
9 #define GrRect_DEFINED
11 #include "SkTypes.h"
12 #include "SkRect.h"
14 struct GrIRect16 {
15 int16_t fLeft, fTop, fRight, fBottom;
17 int width() const { return fRight - fLeft; }
18 int height() const { return fBottom - fTop; }
19 int area() const { return this->width() * this->height(); }
20 bool isEmpty() const { return fLeft >= fRight || fTop >= fBottom; }
22 void set(const SkIRect& r) {
23 fLeft = SkToS16(r.fLeft);
24 fTop = SkToS16(r.fTop);
25 fRight = SkToS16(r.fRight);
26 fBottom = SkToS16(r.fBottom);
27 }
28 };
30 #endif