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

Side by Side Diff: chrome/browser/chromeos/policy/device_active_directory_policy_manager.cc

Issue 2623203005: Chromad: Trigger user/device policy fetch on login/reboot (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/policy/device_active_directory_policy_manager. h" 5 #include "chrome/browser/chromeos/policy/device_active_directory_policy_manager. h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 14 matching lines...) Expand all
25 void DeviceActiveDirectoryPolicyManager::Init(SchemaRegistry* registry) { 25 void DeviceActiveDirectoryPolicyManager::Init(SchemaRegistry* registry) {
26 ConfigurationPolicyProvider::Init(registry); 26 ConfigurationPolicyProvider::Init(registry);
27 27
28 store_->AddObserver(this); 28 store_->AddObserver(this);
29 if (!store_->is_initialized()) { 29 if (!store_->is_initialized()) {
30 store_->Load(); 30 store_->Load();
31 } 31 }
32 32
33 // Does nothing if |store_| hasn't yet initialized. 33 // Does nothing if |store_| hasn't yet initialized.
34 PublishPolicy(); 34 PublishPolicy();
35
36 RefreshPolicies();
35 } 37 }
36 38
37 void DeviceActiveDirectoryPolicyManager::Shutdown() { 39 void DeviceActiveDirectoryPolicyManager::Shutdown() {
38 store_->RemoveObserver(this); 40 store_->RemoveObserver(this);
39 ConfigurationPolicyProvider::Shutdown(); 41 ConfigurationPolicyProvider::Shutdown();
40 } 42 }
41 43
42 bool DeviceActiveDirectoryPolicyManager::IsInitializationComplete( 44 bool DeviceActiveDirectoryPolicyManager::IsInitializationComplete(
43 PolicyDomain domain) const { 45 PolicyDomain domain) const {
44 if (domain == POLICY_DOMAIN_CHROME) 46 if (domain == POLICY_DOMAIN_CHROME)
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 void DeviceActiveDirectoryPolicyManager::OnPolicyRefreshed(bool success) { 94 void DeviceActiveDirectoryPolicyManager::OnPolicyRefreshed(bool success) {
93 if (!success) { 95 if (!success) {
94 LOG(ERROR) << "Active Directory policy refresh failed."; 96 LOG(ERROR) << "Active Directory policy refresh failed.";
95 } 97 }
96 // Load independently of success or failure to keep up to date with whatever 98 // Load independently of success or failure to keep up to date with whatever
97 // has happened on the authpolicyd / session manager side. 99 // has happened on the authpolicyd / session manager side.
98 store_->Load(); 100 store_->Load();
99 } 101 }
100 102
101 } // namespace policy 103 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698