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

Unified Diff: chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc

Issue 2230533002: Delete dead consumer enrollment code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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/chromeos/policy/browser_policy_connector_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
index d5caadc6f4d7d2d1b93559924f515f0954d9ecda..7b74c7b9c023f519ef691a1077c65fa13d3b4cd4 100644
--- a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
+++ b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
@@ -22,7 +22,6 @@
#include "chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.h"
#include "chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl.h"
#include "chrome/browser/chromeos/policy/bluetooth_policy_handler.h"
-#include "chrome/browser/chromeos/policy/consumer_management_service.h"
#include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h"
#include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h"
#include "chrome/browser/chromeos/policy/device_local_account.h"
@@ -61,13 +60,6 @@ namespace policy {
namespace {
-// TODO(davidyu): Update the URL to the real one once it is ready.
-// http://crbug.com/366491.
-//
-// The URL for the consumer device management server.
-const char kDefaultConsumerDeviceManagementServerUrl[] =
- "https://m.google.com/devicemanagement/data/api";
-
// Install attributes for tests.
EnterpriseInstallAttributes* g_testing_install_attributes = NULL;
@@ -80,17 +72,6 @@ scoped_refptr<base::SequencedTaskRunner> GetBackgroundTaskRunner() {
pool->GetSequenceToken(), base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
}
-std::string GetDeviceManagementServerUrlForConsumer() {
- const base::CommandLine* command_line =
- base::CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(
- chromeos::switches::kConsumerDeviceManagementUrl)) {
- return command_line->GetSwitchValueASCII(
- chromeos::switches::kConsumerDeviceManagementUrl);
- }
- return kDefaultConsumerDeviceManagementServerUrl;
-}
-
} // namespace
BrowserPolicyConnectorChromeOS::BrowserPolicyConnectorChromeOS()
@@ -126,16 +107,6 @@ BrowserPolicyConnectorChromeOS::BrowserPolicyConnectorChromeOS()
install_attributes_->Init(install_attrs_file);
}
- const base::CommandLine* command_line =
- base::CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(
- chromeos::switches::kEnableConsumerManagement)) {
- consumer_management_service_.reset(
- new ConsumerManagementService(
- cryptohome_client,
- chromeos::DeviceSettingsService::Get()));
- }
-
std::unique_ptr<DeviceCloudPolicyStoreChromeOS> device_cloud_policy_store(
new DeviceCloudPolicyStoreChromeOS(
chromeos::DeviceSettingsService::Get(), install_attributes_.get(),
@@ -163,18 +134,6 @@ void BrowserPolicyConnectorChromeOS::Init(
affiliated_invalidation_service_provider_.reset(
new AffiliatedInvalidationServiceProviderImpl);
- const base::CommandLine* command_line =
- base::CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(chromeos::switches::kEnableConsumerManagement)) {
- std::unique_ptr<DeviceManagementService::Configuration> configuration(
- new DeviceManagementServiceConfiguration(
- GetDeviceManagementServerUrlForConsumer()));
- consumer_device_management_service_.reset(
- new DeviceManagementService(std::move(configuration)));
- consumer_device_management_service_->ScheduleInitialization(
- kServiceInitializationStartupDelay);
- }
-
if (device_cloud_policy_manager_) {
// Note: for now the |device_cloud_policy_manager_| is using the global
// schema registry. Eventually it will have its own registry, once device
@@ -292,11 +251,6 @@ void BrowserPolicyConnectorChromeOS::SetUserPolicyDelegate(
global_user_cloud_policy_provider_->SetDelegate(user_policy_provider);
}
-void BrowserPolicyConnectorChromeOS::SetConsumerManagementServiceForTesting(
- std::unique_ptr<ConsumerManagementService> service) {
- consumer_management_service_ = std::move(service);
-}
-
void BrowserPolicyConnectorChromeOS::SetDeviceCloudPolicyInitializerForTesting(
std::unique_ptr<DeviceCloudPolicyInitializer> initializer) {
device_cloud_policy_initializer_ = std::move(initializer);
@@ -365,7 +319,6 @@ void BrowserPolicyConnectorChromeOS::RestartDeviceCloudPolicyInitializer() {
new DeviceCloudPolicyInitializer(
local_state_,
device_management_service(),
- consumer_device_management_service_.get(),
GetBackgroundTaskRunner(),
install_attributes_.get(),
state_keys_broker_.get(),

Powered by Google App Engine
This is Rietveld 408576698