intl/icu/source/common/errorcode.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.

     1 /*
     2 *******************************************************************************
     3 *
     4 *   Copyright (C) 2009-2011, International Business Machines
     5 *   Corporation and others.  All Rights Reserved.
     6 *
     7 *******************************************************************************
     8 *   file name:  errorcode.cpp
     9 *   encoding:   US-ASCII
    10 *   tab size:   8 (not used)
    11 *   indentation:4
    12 *
    13 *   created on: 2009mar10
    14 *   created by: Markus W. Scherer
    15 */
    17 #include "unicode/utypes.h"
    18 #include "unicode/errorcode.h"
    20 U_NAMESPACE_BEGIN
    22 ErrorCode::~ErrorCode() {}
    24 UErrorCode ErrorCode::reset() {
    25     UErrorCode code = errorCode;
    26     errorCode = U_ZERO_ERROR;
    27     return code;
    28 }
    30 void ErrorCode::assertSuccess() const {
    31     if(isFailure()) {
    32         handleFailure();
    33     }
    34 }
    36 const char* ErrorCode::errorName() const {
    37   return u_errorName(errorCode);
    38 }
    40 U_NAMESPACE_END

mercurial