Index: chrome/browser/chromeos/login/user_image_view.cc |
diff --git a/chrome/browser/chromeos/login/user_image_view.cc b/chrome/browser/chromeos/login/user_image_view.cc |
index 33fbff3a09ac2333868a7dc247c3d4fb2864e40c..43df7bac0288d6ecaa9e007fb3a51322000d7f44 100644 |
--- a/chrome/browser/chromeos/login/user_image_view.cc |
+++ b/chrome/browser/chromeos/login/user_image_view.cc |
@@ -11,9 +11,7 @@ |
#include "chrome/browser/chromeos/login/helper.h" |
#include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
#include "chrome/browser/chromeos/login/user_manager.h" |
-#include "chrome/browser/policy/profile_policy_connector.h" |
-#include "chrome/browser/policy/profile_policy_connector_factory.h" |
-#include "chrome/browser/profiles/profile_manager.h" |
+#include "chrome/browser/policy/browser_policy_connector.h" |
#include "grit/generated_resources.h" |
#include "grit/theme_resources.h" |
#include "ui/base/l10n/l10n_util.h" |
@@ -59,19 +57,6 @@ views::View* CreateSplitter(const SkColor& color) { |
return splitter; |
} |
-void TriggerPolicyFetch() { |
- // Notify all the profiles that the system is idle enough now for a policy |
- // fetch. (The policy fetch will happen after some delay, see implementation.) |
- ProfileManager* profile_manager = g_browser_process->profile_manager(); |
- std::vector<Profile*> profiles = profile_manager->GetLoadedProfiles(); |
- std::vector<Profile*>::iterator it; |
- for (it = profiles.begin(); it != profiles.end(); ++it) { |
- policy::ProfilePolicyConnectorFactory::GetForProfile(*it)-> |
- ScheduleServiceInitialization( |
- kPolicyServiceInitializationDelayMilliseconds); |
- } |
-} |
- |
} // namespace |
namespace chromeos { |
@@ -135,7 +120,11 @@ void UserImageView::Init() { |
default_images_view_->SetDefaultImageIndex(image_index); |
- TriggerPolicyFetch(); |
+ // Notify the policy subsystem that the system is idle enough now for a |
+ // policy fetch. (The policy fetch will happen after some delay, see |
+ // implementation.) |
+ g_browser_process->browser_policy_connector()->ScheduleServiceInitialization( |
+ kPolicyServiceInitializationDelayMilliseconds); |
} |
void UserImageView::InitLayout() { |