gfx/angle/src/compiler/preprocessor/DirectiveHandlerBase.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 (c) 2012 The ANGLE Project Authors. All rights reserved.
     3 // Use of this source code is governed by a BSD-style license that can be
     4 // found in the LICENSE file.
     5 //
     7 #ifndef COMPILER_PREPROCESSOR_DIRECTIVE_HANDLER_H_
     8 #define COMPILER_PREPROCESSOR_DIRECTIVE_HANDLER_H_
    10 #include <string>
    12 namespace pp
    13 {
    15 struct SourceLocation;
    17 // Base class for handling directives.
    18 // Preprocessor uses this class to notify the clients about certain
    19 // preprocessor directives. Derived classes are responsible for
    20 // handling them in an appropriate manner.
    21 class DirectiveHandler
    22 {
    23   public:
    24     virtual ~DirectiveHandler();
    26     virtual void handleError(const SourceLocation& loc,
    27                              const std::string& msg) = 0;
    29     // Handle pragma of form: #pragma name[(value)]
    30     virtual void handlePragma(const SourceLocation& loc,
    31                               const std::string& name,
    32                               const std::string& value) = 0;
    34     virtual void handleExtension(const SourceLocation& loc,
    35                                  const std::string& name,
    36                                  const std::string& behavior) = 0;
    38     virtual void handleVersion(const SourceLocation& loc,
    39                                int version) = 0;
    40 };
    42 }  // namespace pp
    43 #endif  // COMPILER_PREPROCESSOR_DIRECTIVE_HANDLER_H_

mercurial