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

Unified Diff: chrome/browser/chromeos/login/user_image_view.cc

Issue 6979011: Move user cloud policy to BrowserProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments by mnissler. Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
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 1e5c5f3be4d91c7f1da6e4f75c299ad7c667ee82..51c5a893c7c2ba0d981bb46620337769ae9e2331 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 {
@@ -122,7 +107,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() {

Powered by Google App Engine
This is Rietveld 408576698