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

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

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_manager.cc
diff --git a/chrome/browser/policy/user_cloud_policy_manager.cc b/chrome/browser/policy/user_cloud_policy_manager.cc
deleted file mode 100644
index e0e71a05e166842289bf71253af7371ccfc30eb0..0000000000000000000000000000000000000000
--- a/chrome/browser/policy/user_cloud_policy_manager.cc
+++ /dev/null
@@ -1,70 +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.
-
-#include "chrome/browser/policy/user_cloud_policy_manager.h"
-
-#include "base/bind.h"
-#include "base/bind_helpers.h"
-#include "chrome/browser/policy/cloud_policy_constants.h"
-#include "chrome/browser/policy/cloud_policy_service.h"
-#include "chrome/browser/policy/policy_types.h"
-#include "chrome/browser/policy/user_cloud_policy_manager_factory.h"
-#include "chrome/browser/policy/user_cloud_policy_store.h"
-#include "chrome/common/pref_names.h"
-
-namespace em = enterprise_management;
-
-namespace policy {
-
-UserCloudPolicyManager::UserCloudPolicyManager(
- Profile* profile,
- scoped_ptr<UserCloudPolicyStore> store)
- : CloudPolicyManager(
- PolicyNamespaceKey(dm_protocol::kChromeUserPolicyType, std::string()),
- store.get()),
- profile_(profile),
- store_(store.Pass()) {
- UserCloudPolicyManagerFactory::GetInstance()->Register(profile_, this);
-}
-
-UserCloudPolicyManager::~UserCloudPolicyManager() {
- UserCloudPolicyManagerFactory::GetInstance()->Unregister(profile_, this);
-}
-
-void UserCloudPolicyManager::Connect(
- PrefService* local_state, scoped_ptr<CloudPolicyClient> client) {
- core()->Connect(client.Pass());
- core()->StartRefreshScheduler();
- core()->TrackRefreshDelayPref(local_state, prefs::kUserPolicyRefreshRate);
-}
-
-// static
-scoped_ptr<CloudPolicyClient>
-UserCloudPolicyManager::CreateCloudPolicyClient(
- DeviceManagementService* device_management_service) {
- return make_scoped_ptr(
- new CloudPolicyClient(std::string(), std::string(),
- USER_AFFILIATION_NONE,
- NULL, device_management_service)).Pass();
-}
-
-void UserCloudPolicyManager::DisconnectAndRemovePolicy() {
- core()->Disconnect();
- store_->Clear();
-}
-
-bool UserCloudPolicyManager::IsClientRegistered() const {
- return client() && client()->is_registered();
-}
-
-void UserCloudPolicyManager::RegisterClient(const std::string& access_token) {
- DCHECK(client()) << "Callers must invoke Initialize() first";
- if (!client()->is_registered()) {
- DVLOG(1) << "Registering client with access token: " << access_token;
- client()->Register(em::DeviceRegisterRequest::BROWSER,
- access_token, std::string(), false);
- }
-}
-
-} // namespace policy
« no previous file with comments | « chrome/browser/policy/user_cloud_policy_manager.h ('k') | chrome/browser/policy/user_cloud_policy_manager_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698