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

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

Issue 12676017: Adding policy support to the new network configuration stack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang errors. Created 7 years, 8 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 (c) 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_CONFIGURATION_UPDATER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_NETWORK_CONFIGURATION_UPDATER_IMPL_H_
7
8 #include <string>
9
10 #include "chrome/browser/chromeos/policy/network_configuration_updater.h"
11 #include "chrome/browser/policy/policy_service.h"
12 #include "chromeos/network/onc/onc_constants.h"
13
14 namespace base {
15 class Value;
16 }
17
18 namespace policy {
19
20 class PolicyMap;
21
22 // This implementation pushes policies to the
23 // ManagedNetworkConfigurationHandler. User policies are only pushed after
24 // OnUserPolicyInitialized() was called.
25 // TODO(pneubeck): Certificates are not implemented yet, they are silently
26 // ignored.
27 class NetworkConfigurationUpdaterImpl : public NetworkConfigurationUpdater {
28 public:
29 explicit NetworkConfigurationUpdaterImpl(PolicyService* policy_service);
30 virtual ~NetworkConfigurationUpdaterImpl();
31
32 // NetworkConfigurationUpdater overrides.
33
34 virtual void OnUserPolicyInitialized() OVERRIDE;
35 virtual void set_allow_trusted_certificates_from_policy(bool allow) OVERRIDE {
36 }
37 virtual net::CertTrustAnchorProvider* GetCertTrustAnchorProvider() OVERRIDE;
38
39 private:
40 // Callback that's called by |policy_service_| if the respective ONC policy
41 // changed.
42 void OnPolicyChanged(chromeos::onc::ONCSource onc_source,
43 const base::Value* previous,
44 const base::Value* current);
45
46 void ApplyNetworkConfiguration(chromeos::onc::ONCSource onc_source);
47
48 // Whether the user policy is already available.
49 bool user_policy_initialized_;
50
51 // Wraps the policy service we read network configuration from.
52 PolicyChangeRegistrar policy_change_registrar_;
53
54 // The policy service storing the ONC policies.
55 PolicyService* policy_service_;
56
57 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationUpdaterImpl);
58 };
59
60 } // namespace policy
61
62 #endif // CHROME_BROWSER_CHROMEOS_POLICY_NETWORK_CONFIGURATION_UPDATER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698