gfx/skia/trunk/include/utils/SkCountdown.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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  */
     8 #ifndef SkCountdown_DEFINED
     9 #define SkCountdown_DEFINED
    11 #include "SkCondVar.h"
    12 #include "SkRunnable.h"
    13 #include "SkTypes.h"
    15 class SkCountdown : public SkRunnable {
    16 public:
    17     explicit SkCountdown(int32_t count);
    19     /**
    20      * Resets the countdown to the count provided.
    21      */
    22     void reset(int32_t count);
    24     virtual void run() SK_OVERRIDE;
    26     /**
    27      * Blocks until run() has been called count times.
    28      */
    29     void wait();
    31 private:
    32     SkCondVar fReady;
    33     int32_t   fCount;
    34 };
    36 #endif

mercurial