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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 | 614 |
615 SetTimezoneIfPolicyAvailable(); | 615 SetTimezoneIfPolicyAvailable(); |
616 #endif | 616 #endif |
617 | 617 |
618 // TODO: Do not use g_browser_process once policy service is moved to | 618 // TODO: Do not use g_browser_process once policy service is moved to |
619 // BrowserPolicyConnector (http://crbug.com/128999). | 619 // BrowserPolicyConnector (http://crbug.com/128999). |
620 policy_statistics_collector_.reset(new policy::PolicyStatisticsCollector( | 620 policy_statistics_collector_.reset(new policy::PolicyStatisticsCollector( |
621 g_browser_process->policy_service(), | 621 g_browser_process->policy_service(), |
622 g_browser_process->local_state(), | 622 g_browser_process->local_state(), |
623 MessageLoop::current()->message_loop_proxy())); | 623 MessageLoop::current()->message_loop_proxy())); |
| 624 policy_statistics_collector_->Initialize(); |
624 } | 625 } |
625 | 626 |
626 void BrowserPolicyConnector::SetTimezoneIfPolicyAvailable() { | 627 void BrowserPolicyConnector::SetTimezoneIfPolicyAvailable() { |
627 #if defined(OS_CHROMEOS) | 628 #if defined(OS_CHROMEOS) |
628 typedef chromeos::CrosSettingsProvider Provider; | 629 typedef chromeos::CrosSettingsProvider Provider; |
629 Provider::TrustedStatus result = | 630 Provider::TrustedStatus result = |
630 chromeos::CrosSettings::Get()->PrepareTrustedValues( | 631 chromeos::CrosSettings::Get()->PrepareTrustedValues( |
631 base::Bind(&BrowserPolicyConnector::SetTimezoneIfPolicyAvailable, | 632 base::Bind(&BrowserPolicyConnector::SetTimezoneIfPolicyAvailable, |
632 weak_ptr_factory_.GetWeakPtr())); | 633 weak_ptr_factory_.GetWeakPtr())); |
633 | 634 |
(...skipping 28 matching lines...) Expand all Loading... |
662 return new AsyncPolicyProvider(loader.Pass()); | 663 return new AsyncPolicyProvider(loader.Pass()); |
663 } else { | 664 } else { |
664 return NULL; | 665 return NULL; |
665 } | 666 } |
666 #else | 667 #else |
667 return NULL; | 668 return NULL; |
668 #endif | 669 #endif |
669 } | 670 } |
670 | 671 |
671 } // namespace policy | 672 } // namespace policy |
OLD | NEW |