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

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

Issue 12189011: Split up chrome/browser/policy subdirectory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, add chrome/browser/chromeos/policy/OWNERS Created 7 years, 9 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
Index: chrome/browser/policy/user_cloud_policy_store.h
diff --git a/chrome/browser/policy/user_cloud_policy_store.h b/chrome/browser/policy/user_cloud_policy_store.h
deleted file mode 100644
index 5b117667193007abbbee24aa364ca90573432283..0000000000000000000000000000000000000000
--- a/chrome/browser/policy/user_cloud_policy_store.h
+++ /dev/null
@@ -1,82 +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_USER_CLOUD_POLICY_STORE_H_
-#define CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_H_
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/files/file_path.h"
-#include "base/memory/weak_ptr.h"
-#include "chrome/browser/policy/user_cloud_policy_store_base.h"
-
-class Profile;
-
-namespace policy {
-
-// Implements a cloud policy store that is stored in a simple file in the user's
-// profile directory. This is used on (non-chromeos) platforms that do not have
-// a secure storage implementation.
-class UserCloudPolicyStore : public UserCloudPolicyStoreBase {
- public:
- // Creates a policy store associated with the user signed in to this
- // |profile|.
- UserCloudPolicyStore(Profile* profile, const base::FilePath& policy_file);
- virtual ~UserCloudPolicyStore();
-
- // Factory method for creating a UserCloudPolicyStore for |profile|.
- static scoped_ptr<UserCloudPolicyStore> Create(Profile* profile);
-
- // Loads policy immediately on the current thread. Virtual for mocks.
- virtual void LoadImmediately();
-
- // Deletes any existing policy blob and notifies observers via OnStoreLoaded()
- // that the blob has changed. Virtual for mocks.
- virtual void Clear();
-
- // CloudPolicyStore implementation.
- virtual void Load() OVERRIDE;
- virtual void Store(
- const enterprise_management::PolicyFetchResponse& policy) OVERRIDE;
-
- private:
- // Callback invoked when a new policy has been loaded from disk. If
- // |validate_in_background| is true, then policy is validated via a background
- // thread.
- void PolicyLoaded(bool validate_in_background,
- struct PolicyLoadResult policy_load_result);
-
- // Starts policy blob validation. |callback| is invoked once validation is
- // complete. If |validate_in_background| is true, then the validation work
- // occurs on a background thread (results are sent back to the calling
- // thread).
- void Validate(
- scoped_ptr<enterprise_management::PolicyFetchResponse> policy,
- bool validate_in_background,
- const UserCloudPolicyValidator::CompletionCallback& callback);
-
- // Callback invoked to install a just-loaded policy after validation has
- // finished.
- void InstallLoadedPolicyAfterValidation(UserCloudPolicyValidator* validator);
-
- // Callback invoked to store the policy after validation has finished.
- void StorePolicyAfterValidation(UserCloudPolicyValidator* validator);
-
- // WeakPtrFactory used to create callbacks for validating and storing policy.
- base::WeakPtrFactory<UserCloudPolicyStore> weak_factory_;
-
- // Weak pointer to the profile associated with this store.
- Profile* profile_;
-
- // Path to file where we store persisted policy.
- base::FilePath backing_file_path_;
-
- DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStore);
-};
-
-} // namespace policy
-
-#endif // CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_H_
« no previous file with comments | « chrome/browser/policy/user_cloud_policy_manager_unittest.cc ('k') | chrome/browser/policy/user_cloud_policy_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698