summaryrefslogtreecommitdiffstats
path: root/content/public/browser/security_style_explanation.h
blob: 1b8215e3cfc69a5542c982e0877205e7619277f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_PUBLIC_BROWSER_SECURITY_STYLE_EXPLANATION_H_
#define CONTENT_PUBLIC_BROWSER_SECURITY_STYLE_EXPLANATION_H_

#include <string>

#include "content/common/content_export.h"

namespace content {

// A human-readable summary phrase and more detailed description of a
// security property that was used to compute the SecurityStyle of a
// resource. An example summary phrase would be "Expired Certificate",
// with a description along the lines of "This site's certificate chain
// contains errors (net::CERT_DATE_INVALID)".
struct SecurityStyleExplanation {
  CONTENT_EXPORT SecurityStyleExplanation(){};
  CONTENT_EXPORT SecurityStyleExplanation(const std::string& summary,
                                          const std::string& description)
      : summary(summary), description(description), cert_id(0) {}
  CONTENT_EXPORT SecurityStyleExplanation(const std::string& summary,
                                          const std::string& description,
                                          int cert_id)
      : summary(summary), description(description), cert_id(cert_id) {}
  CONTENT_EXPORT ~SecurityStyleExplanation() {}

  std::string summary;
  std::string description;
  int cert_id;
};

}  // namespace content

#endif  // CONTENT_PUBLIC_BROWSER_SECURITY_STYLE_EXPLANATION_H_