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

Side by Side Diff: chrome/browser/chromeos/policy/network_policy_service.h

Issue 24153012: Fix cyclic dependency between ProfilePolicyConnector and PrefService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix NetworkPolicyServiceFactory to shared service for incognito with original profile. Created 7 years, 3 months 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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 CHROME_BROWSER_CHROMEOS_POLICY_NETWORK_POLICY_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_NETWORK_POLICY_SERVICE_H_
7
8 #include <vector>
9
10 #include "base/callback.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h"
13 #include "components/browser_context_keyed_service/browser_context_keyed_service .h"
14
15 class Profile;
16 class PrefService;
17
18 namespace net {
19 class CertTrustAnchorProvider;
Joao da Silva 2013/09/20 13:00:01 Not used
pneubeck (no reviews) 2013/10/15 13:23:11 Done.
20 class X509Certificate;
21 typedef std::vector<scoped_refptr<X509Certificate> > CertificateList;
22 }
23
24 namespace policy {
25
26 class PolicyCertVerifier;
27 class PolicyService;
28 class UserNetworkConfigurationUpdater;
29
30 class NetworkPolicyService : public BrowserContextKeyedService {
Joao da Silva 2013/09/20 13:00:01 Document
31 public:
32 NetworkPolicyService(Profile* profile, PolicyService* policy_service);
33 virtual ~NetworkPolicyService();
34
35 // Sets the CertVerifier on which the current list of Web trusted server and
36 // CA certificates will be set. Policy updates will trigger further calls to
37 // |cert_verifier| later. |cert_verifier| must be valid until
38 // SetPolicyCertVerifier is called again (with another CertVerifier or NULL)
39 // or until this Connector is destructed. |cert_verifier|'s methods are only
40 // called on the IO thread. This function must be called on the UI thread.
41 void SetPolicyCertVerifier(PolicyCertVerifier* cert_verifier);
42
43 void SetUsedPolicyCertificatesOnce();
Joao da Silva 2013/09/20 13:00:01 Can't this be private?
pneubeck (no reviews) 2013/10/15 13:23:11 Done.
44
45 // Returns a callback that should be called if a policy installed certificate
46 // was trusted for the associated profile. The closure can be safely used (on
47 // the UI thread) even after this Connector is destructed.
48 base::Closure GetPolicyCertTrustedCallback();
49
50 // Sets |certs| to the list of Web trusted server and CA certificates from the
51 // last received ONC user policy.
52 void GetWebTrustedCertificates(net::CertificateList* certs) const;
53
54 // Returns true if the profile with |user_prefs| has used certificates
55 // installed via policy to establish a secure connection before. This means
56 // that it may have cached content from an untrusted source.
57 bool UsedPolicyCertificates();
58
59 // BrowserContextKeyedService:
60 virtual void Shutdown() OVERRIDE;
61
62 private:
63 PrefService* user_prefs_;
64 scoped_ptr<UserNetworkConfigurationUpdater> network_configuration_updater_;
65 base::WeakPtrFactory<NetworkPolicyService> weak_ptr_factory_;
66
67 DISALLOW_COPY_AND_ASSIGN(NetworkPolicyService);
68 };
69
70 } // namespace policy
71
72 #endif // CHROME_BROWSER_CHROMEOS_POLICY_NETWORK_POLICY_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698