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

Unified Diff: chrome/browser/policy/config_dir_policy_provider.h

Issue 10443108: Implement the ConfigDirPolicyProvider based on the AsyncPolicyLoader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/policy/config_dir_policy_loader_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/config_dir_policy_provider.h
diff --git a/chrome/browser/policy/config_dir_policy_provider.h b/chrome/browser/policy/config_dir_policy_provider.h
deleted file mode 100644
index e938c1df07b40b8ab07aa739a798bdb1a4337f74..0000000000000000000000000000000000000000
--- a/chrome/browser/policy/config_dir_policy_provider.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_POLICY_CONFIG_DIR_POLICY_PROVIDER_H_
-#define CHROME_BROWSER_POLICY_CONFIG_DIR_POLICY_PROVIDER_H_
-#pragma once
-
-#include "base/time.h"
-#include "chrome/browser/policy/file_based_policy_provider.h"
-
-class FilePath;
-
-namespace base {
-class Value;
-}
-
-namespace policy {
-
-class PolicyBundle;
-
-// Policy provider backed by JSON files in a configuration directory.
-class ConfigDirPolicyProvider : public FileBasedPolicyProvider {
- public:
- ConfigDirPolicyProvider(const PolicyDefinitionList* policy_list,
- PolicyLevel level,
- PolicyScope scope,
- const FilePath& config_dir);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ConfigDirPolicyProvider);
-};
-
-// A provider delegate implementation backed by a set of files in a given
-// directory. The files should contain JSON-formatted policy settings. They are
-// merged together and the result is returned via the ProviderDelegate
-// interface. The files are consulted in lexicographic file name order, so the
-// last value read takes precedence in case of preference key collisions.
-class ConfigDirPolicyProviderDelegate
- : public FileBasedPolicyProvider::ProviderDelegate {
- public:
- ConfigDirPolicyProviderDelegate(const FilePath& config_dir,
- PolicyLevel level,
- PolicyScope scope);
-
- // FileBasedPolicyProvider::ProviderDelegate implementation.
- virtual scoped_ptr<PolicyBundle> Load() OVERRIDE;
- virtual base::Time GetLastModification() OVERRIDE;
-
- private:
- // Merges the 3rd party |policies| into the |bundle|.
- void Merge3rdPartyPolicy(PolicyBundle* bundle,
- const base::Value* policies);
-
- // Policies loaded by this provider will have these attributes.
- PolicyLevel level_;
- PolicyScope scope_;
-
- DISALLOW_COPY_AND_ASSIGN(ConfigDirPolicyProviderDelegate);
-};
-
-} // namespace policy
-
-#endif // CHROME_BROWSER_POLICY_CONFIG_DIR_POLICY_PROVIDER_H_
« no previous file with comments | « chrome/browser/policy/config_dir_policy_loader_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698