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

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

Issue 7147015: Move user cloud policy to BrowserProcess (was 6979011) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit_test include breakage 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 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() {

Powered by Google App Engine
This is Rietveld 408576698