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

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

Issue 6705031: Send policy blobs to session_manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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/cloud_policy_controller.cc
diff --git a/chrome/browser/policy/cloud_policy_controller.cc b/chrome/browser/policy/cloud_policy_controller.cc
index be8c1730172501dd0f190baea13df7358499fd00..e8dd70de49825b60aed614b08e2cf398ae41790c 100644
--- a/chrome/browser/policy/cloud_policy_controller.cc
+++ b/chrome/browser/policy/cloud_policy_controller.cc
@@ -6,10 +6,11 @@
#include <algorithm>
+#include "base/logging.h"
#include "base/message_loop.h"
#include "base/rand_util.h"
#include "base/string_util.h"
-#include "chrome/browser/policy/cloud_policy_cache.h"
+#include "chrome/browser/policy/cloud_policy_cache_base.h"
#include "chrome/browser/policy/cloud_policy_subsystem.h"
#include "chrome/browser/policy/device_management_backend.h"
#include "chrome/browser/policy/proto/device_management_constants.h"
@@ -59,7 +60,7 @@ static const int kPolicyRefreshRateInMilliseconds =
3 * 60 * 60 * 1000; // 3 hours.
CloudPolicyController::CloudPolicyController(
- CloudPolicyCache* cache,
+ CloudPolicyCacheBase* cache,
DeviceManagementBackend* backend,
DeviceTokenFetcher* token_fetcher,
CloudPolicyIdentityStrategy* identity_strategy)
@@ -101,9 +102,6 @@ void CloudPolicyController::HandlePolicyResponse(
// Use the new version of the protocol
cache_->SetPolicy(response.response(0));
SetState(STATE_POLICY_VALID);
- } else {
- cache_->SetDevicePolicy(response);
- SetState(STATE_POLICY_VALID);
}
}
@@ -141,7 +139,7 @@ void CloudPolicyController::OnCredentialsChanged() {
}
CloudPolicyController::CloudPolicyController(
- CloudPolicyCache* cache,
+ CloudPolicyCacheBase* cache,
DeviceManagementBackend* backend,
DeviceTokenFetcher* token_fetcher,
CloudPolicyIdentityStrategy* identity_strategy,
@@ -161,7 +159,7 @@ CloudPolicyController::CloudPolicyController(
}
void CloudPolicyController::Initialize(
- CloudPolicyCache* cache,
+ CloudPolicyCacheBase* cache,
DeviceManagementBackend* backend,
DeviceTokenFetcher* token_fetcher,
CloudPolicyIdentityStrategy* identity_strategy,
@@ -218,14 +216,6 @@ void CloudPolicyController::SendPolicyRequest() {
fetch_request->set_timestamp(timestamp.InMilliseconds());
}
- // TODO(gfeher): Remove the following block when the server is migrated.
- // Set fields for the old protocol.
- policy_request.set_policy_scope(kChromePolicyScope);
- em::DevicePolicySettingRequest* setting =
- policy_request.add_setting_request();
- setting->set_key(kChromeDevicePolicySettingKey);
- setting->set_watermark("");
-
backend_->ProcessPolicyRequest(identity_strategy_->GetDeviceToken(),
identity_strategy_->GetDeviceID(),
policy_request, this);

Powered by Google App Engine
This is Rietveld 408576698