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

Side by Side Diff: chrome/browser/policy/browser_policy_connector.cc

Issue 11086085: Initialize the PolicyStatusCollector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, rename Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698