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 (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_DIAGNOSTICS_H_
8 #define COMPILER_DIAGNOSTICS_H_
10 #include "compiler/preprocessor/DiagnosticsBase.h"
12 class TInfoSink;
14 class TDiagnostics : public pp::Diagnostics
15 {
16 public:
17 TDiagnostics(TInfoSink& infoSink);
18 virtual ~TDiagnostics();
20 TInfoSink& infoSink() { return mInfoSink; }
22 int numErrors() const { return mNumErrors; }
23 int numWarnings() const { return mNumWarnings; }
25 void writeInfo(Severity severity,
26 const pp::SourceLocation& loc,
27 const std::string& reason,
28 const std::string& token,
29 const std::string& extra);
31 void writeDebug(const std::string& str);
33 protected:
34 virtual void print(ID id,
35 const pp::SourceLocation& loc,
36 const std::string& text);
38 private:
39 TInfoSink& mInfoSink;
40 int mNumErrors;
41 int mNumWarnings;
42 };
44 #endif // COMPILER_DIAGNOSTICS_H_