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

Unified Diff: chrome/browser/policy/user_cloud_policy_store_chromeos.cc

Issue 11415094: Split UserCloudPolicyManager implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix DeviceCloudPolicyManagerChromeOSTest.EnrolledDevice failure. Created 8 years, 1 month 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_chromeos.cc
diff --git a/chrome/browser/policy/user_cloud_policy_store_chromeos.cc b/chrome/browser/policy/user_cloud_policy_store_chromeos.cc
index 850d5aac802ef42dd614bdc5d99d3c76cdb6a5a4..21f30bcb4ff58eac0d1c5a1fe40c7102d75cc5d9 100644
--- a/chrome/browser/policy/user_cloud_policy_store_chromeos.cc
+++ b/chrome/browser/policy/user_cloud_policy_store_chromeos.cc
@@ -9,18 +9,13 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
-#include "base/command_line.h"
#include "base/file_util.h"
#include "base/memory/ref_counted.h"
-#include "base/path_service.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/policy/proto/cloud_policy.pb.h"
#include "chrome/browser/policy/proto/device_management_local.pb.h"
#include "chrome/browser/policy/user_policy_disk_cache.h"
#include "chrome/browser/policy/user_policy_token_cache.h"
-#include "chrome/common/chrome_paths.h"
-#include "chrome/common/chrome_switches.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager_client.h"
#include "content/public/browser/browser_thread.h"
#include "google_apis/gaia/gaia_auth_util.h"
@@ -182,13 +177,6 @@ void UserCloudPolicyStoreChromeOS::Load() {
weak_factory_.GetWeakPtr()));
}
-void UserCloudPolicyStoreChromeOS::RemoveStoredPolicy() {
- // This should never be called on ChromeOS since it is not possible to sign
- // out of a Profile. The underlying policy store is only removed if the
- // Profile itself is deleted.
- NOTREACHED();
-}
-
void UserCloudPolicyStoreChromeOS::OnPolicyRetrieved(
const std::string& policy_blob) {
if (policy_blob.empty()) {
@@ -358,25 +346,4 @@ void UserCloudPolicyStoreChromeOS::RemoveLegacyCacheDir(const FilePath& dir) {
LOG(ERROR) << "Failed to remove cache dir " << dir.value();
}
-// static
-scoped_ptr<CloudPolicyStore> CloudPolicyStore::CreateUserPolicyStore(
- Profile* profile, bool force_immediate_policy_load) {
- // On ChromeOS, callers should never try to load policy synchronously
- // (profile initialization is always asynchronous).
- DCHECK(!force_immediate_policy_load);
- FilePath profile_dir;
- CHECK(PathService::Get(chrome::DIR_USER_DATA, &profile_dir));
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- const FilePath policy_dir =
- profile_dir
- .Append(command_line->GetSwitchValuePath(switches::kLoginProfile))
- .Append(kPolicyDir);
- const FilePath policy_cache_file = policy_dir.Append(kPolicyCacheFile);
- const FilePath token_cache_file = policy_dir.Append(kTokenCacheFile);
-
- return scoped_ptr<CloudPolicyStore>(new UserCloudPolicyStoreChromeOS(
- chromeos::DBusThreadManager::Get()->GetSessionManagerClient(),
- token_cache_file, policy_cache_file));
-}
-
} // namespace policy
« no previous file with comments | « chrome/browser/policy/user_cloud_policy_store_chromeos.h ('k') | chrome/browser/policy/user_policy_signin_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698