OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/policy/browser_policy_connector.h" | 5 #include "chrome/browser/policy/browser_policy_connector.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 return recommended_platform_provider_.get(); | 142 return recommended_platform_provider_.get(); |
143 } | 143 } |
144 | 144 |
145 ConfigurationPolicyProvider* | 145 ConfigurationPolicyProvider* |
146 BrowserPolicyConnector::GetRecommendedCloudProvider() const { | 146 BrowserPolicyConnector::GetRecommendedCloudProvider() const { |
147 return recommended_cloud_provider_.get(); | 147 return recommended_cloud_provider_.get(); |
148 } | 148 } |
149 | 149 |
150 void BrowserPolicyConnector::RegisterForDevicePolicy( | 150 void BrowserPolicyConnector::RegisterForDevicePolicy( |
151 const std::string& owner_email, | 151 const std::string& owner_email, |
152 const std::string& token) { | 152 const std::string& token, |
| 153 bool is_auto_enrollment) { |
153 #if defined(OS_CHROMEOS) | 154 #if defined(OS_CHROMEOS) |
154 if (device_data_store_.get()) { | 155 if (device_data_store_.get()) { |
155 device_data_store_->set_user_name(owner_email); | 156 device_data_store_->set_user_name(owner_email); |
| 157 device_data_store_->set_is_auto_enrollment(is_auto_enrollment); |
156 device_data_store_->SetOAuthToken(token); | 158 device_data_store_->SetOAuthToken(token); |
157 } | 159 } |
158 #endif | 160 #endif |
159 } | 161 } |
160 | 162 |
161 bool BrowserPolicyConnector::IsEnterpriseManaged() { | 163 bool BrowserPolicyConnector::IsEnterpriseManaged() { |
162 #if defined(OS_CHROMEOS) | 164 #if defined(OS_CHROMEOS) |
163 return install_attributes_.get() && install_attributes_->IsEnterpriseDevice(); | 165 return install_attributes_.get() && install_attributes_->IsEnterpriseDevice(); |
164 #else | 166 #else |
165 return false; | 167 return false; |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 config_dir_path.Append(FILE_PATH_LITERAL("recommended"))); | 489 config_dir_path.Append(FILE_PATH_LITERAL("recommended"))); |
488 } else { | 490 } else { |
489 return NULL; | 491 return NULL; |
490 } | 492 } |
491 #else | 493 #else |
492 return NULL; | 494 return NULL; |
493 #endif | 495 #endif |
494 } | 496 } |
495 | 497 |
496 } // namespace policy | 498 } // namespace policy |
OLD | NEW |