Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(553)

Side by Side Diff: components/security_state/security_state_model_client.h

Issue 2448943002: Refactor SecurityStateModel/Clients for simplicity and reusability. (Closed)
Patch Set: sync. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_CLIENT_H_
6 #define COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_CLIENT_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "components/security_state/security_state_model.h"
11 #include "net/cert/cert_status_flags.h"
12
13 namespace net {
14 class X509Certificate;
15 } // namespace net
16
17 namespace security_state {
18
19 // Provides embedder-specific information that a SecurityStateModel
20 // needs to determine the page's security status.
21 class SecurityStateModelClient {
22 public:
23 SecurityStateModelClient() {}
24 virtual ~SecurityStateModelClient() {}
25
26 // Retrieves the visible security state that is relevant to the
27 // SecurityStateModel.
28 virtual void GetVisibleSecurityState(
29 SecurityStateModel::VisibleSecurityState* state) = 0;
30
31 // Returns true if the page or request is known to be loaded with a
32 // certificate installed by the system administrator.
33 virtual bool UsedPolicyInstalledCertificate() = 0;
34
35 // Returns true if the given |url|'s origin should be considered secure.
36 virtual bool IsOriginSecure(const GURL& url) = 0;
37
38 private:
39 DISALLOW_COPY_AND_ASSIGN(SecurityStateModelClient);
40 };
41
42 } // namespace security_state
43
44 #endif // COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_CLIENT_H_
OLDNEW
« no previous file with comments | « components/security_state/security_state_model.cc ('k') | components/security_state/security_state_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698