gfx/skia/trunk/src/utils/win/SkAutoCoInitialize.cpp

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.

     2 /*
     3  * Copyright 2011 Google Inc.
     4  *
     5  * Use of this source code is governed by a BSD-style license that can be
     6  * found in the LICENSE file.
     7  */
    10 #define WIN32_LEAN_AND_MEAN
    11 #include <windows.h>
    12 #include <ole2.h>
    13 #include "SkAutoCoInitialize.h"
    15 SkAutoCoInitialize::SkAutoCoInitialize() :
    16     fHR(
    17         CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)
    18     )
    19 { }
    21 SkAutoCoInitialize::~SkAutoCoInitialize() {
    22     if (SUCCEEDED(this->fHR)) {
    23         CoUninitialize();
    24     }
    25 }
    27 bool SkAutoCoInitialize::succeeded() {
    28     return SUCCEEDED(this->fHR) || RPC_E_CHANGED_MODE == this->fHR;
    29 }

mercurial