| 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/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 270 |
| 271 void BrowserPolicyConnector::FetchCloudPolicy() { | 271 void BrowserPolicyConnector::FetchCloudPolicy() { |
| 272 #if defined(OS_CHROMEOS) | 272 #if defined(OS_CHROMEOS) |
| 273 if (device_cloud_policy_subsystem_.get()) | 273 if (device_cloud_policy_subsystem_.get()) |
| 274 device_cloud_policy_subsystem_->RefreshPolicies(false); | 274 device_cloud_policy_subsystem_->RefreshPolicies(false); |
| 275 if (user_cloud_policy_subsystem_.get()) | 275 if (user_cloud_policy_subsystem_.get()) |
| 276 user_cloud_policy_subsystem_->RefreshPolicies(true); // wait_for_auth_token | 276 user_cloud_policy_subsystem_->RefreshPolicies(true); // wait_for_auth_token |
| 277 #endif | 277 #endif |
| 278 } | 278 } |
| 279 | 279 |
| 280 void BrowserPolicyConnector::RefreshPolicies() { | |
| 281 if (managed_platform_provider_.get()) | |
| 282 managed_platform_provider_->RefreshPolicies(); | |
| 283 if (recommended_platform_provider_.get()) | |
| 284 recommended_platform_provider_->RefreshPolicies(); | |
| 285 if (managed_cloud_provider_.get()) | |
| 286 managed_cloud_provider_->RefreshPolicies(); | |
| 287 if (recommended_cloud_provider_.get()) | |
| 288 recommended_cloud_provider_->RefreshPolicies(); | |
| 289 } | |
| 290 | |
| 291 void BrowserPolicyConnector::ScheduleServiceInitialization( | 280 void BrowserPolicyConnector::ScheduleServiceInitialization( |
| 292 int64 delay_milliseconds) { | 281 int64 delay_milliseconds) { |
| 293 if (user_cloud_policy_subsystem_.get()) { | 282 if (user_cloud_policy_subsystem_.get()) { |
| 294 user_cloud_policy_subsystem_-> | 283 user_cloud_policy_subsystem_-> |
| 295 ScheduleServiceInitialization(delay_milliseconds); | 284 ScheduleServiceInitialization(delay_milliseconds); |
| 296 } | 285 } |
| 297 #if defined(OS_CHROMEOS) | 286 #if defined(OS_CHROMEOS) |
| 298 if (device_cloud_policy_subsystem_.get()) { | 287 if (device_cloud_policy_subsystem_.get()) { |
| 299 device_cloud_policy_subsystem_-> | 288 device_cloud_policy_subsystem_-> |
| 300 ScheduleServiceInitialization(delay_milliseconds); | 289 ScheduleServiceInitialization(delay_milliseconds); |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 config_dir_path.Append(FILE_PATH_LITERAL("recommended"))); | 566 config_dir_path.Append(FILE_PATH_LITERAL("recommended"))); |
| 578 } else { | 567 } else { |
| 579 return NULL; | 568 return NULL; |
| 580 } | 569 } |
| 581 #else | 570 #else |
| 582 return NULL; | 571 return NULL; |
| 583 #endif | 572 #endif |
| 584 } | 573 } |
| 585 | 574 |
| 586 } // namespace policy | 575 } // namespace policy |
| OLD | NEW |