OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "components/policy/core/common/config_dir_policy_loader.h" | 5 #include "components/policy/core/common/config_dir_policy_loader.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 scoped_ptr<PolicyBundle> bundle(new PolicyBundle()); | 77 scoped_ptr<PolicyBundle> bundle(new PolicyBundle()); |
78 LoadFromPath(config_dir_.Append(kMandatoryConfigDir), | 78 LoadFromPath(config_dir_.Append(kMandatoryConfigDir), |
79 POLICY_LEVEL_MANDATORY, | 79 POLICY_LEVEL_MANDATORY, |
80 bundle.get()); | 80 bundle.get()); |
81 LoadFromPath(config_dir_.Append(kRecommendedConfigDir), | 81 LoadFromPath(config_dir_.Append(kRecommendedConfigDir), |
82 POLICY_LEVEL_RECOMMENDED, | 82 POLICY_LEVEL_RECOMMENDED, |
83 bundle.get()); | 83 bundle.get()); |
84 return bundle.Pass(); | 84 return bundle.Pass(); |
85 } | 85 } |
86 | 86 |
87 PolicySource ConfigDirPolicyLoader::source() const { | |
Thiemo Nagel
2015/09/01 17:40:37
Remove.
fhorschig
2015/09/04 06:53:54
Done.
| |
88 return POLICY_SOURCE_PLATFORM; | |
89 } | |
90 | |
87 base::Time ConfigDirPolicyLoader::LastModificationTime() { | 91 base::Time ConfigDirPolicyLoader::LastModificationTime() { |
88 static const base::FilePath::CharType* kConfigDirSuffixes[] = { | 92 static const base::FilePath::CharType* kConfigDirSuffixes[] = { |
89 kMandatoryConfigDir, | 93 kMandatoryConfigDir, |
90 kRecommendedConfigDir, | 94 kRecommendedConfigDir, |
91 }; | 95 }; |
92 | 96 |
93 base::Time last_modification = base::Time(); | 97 base::Time last_modification = base::Time(); |
94 base::File::Info info; | 98 base::File::Info info; |
95 | 99 |
96 for (size_t i = 0; i < arraysize(kConfigDirSuffixes); ++i) { | 100 for (size_t i = 0; i < arraysize(kConfigDirSuffixes); ++i) { |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
222 } | 226 } |
223 } | 227 } |
224 | 228 |
225 void ConfigDirPolicyLoader::OnFileUpdated(const base::FilePath& path, | 229 void ConfigDirPolicyLoader::OnFileUpdated(const base::FilePath& path, |
226 bool error) { | 230 bool error) { |
227 if (!error) | 231 if (!error) |
228 Reload(false); | 232 Reload(false); |
229 } | 233 } |
230 | 234 |
231 } // namespace policy | 235 } // namespace policy |
OLD | NEW |