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

Unified Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc

Issue 330843002: Make the policy fetch for first time login blocking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes excluding test Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
index ba317a76abbf414982f71ae49f9ec38a8312af8e..5be4682e9a97487901760a999c43a5ef226b46b9 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
@@ -64,7 +64,7 @@ const base::FilePath::CharType kPolicyExternalDataDir[] =
// Timeout in seconds after which to abandon the initial policy fetch and start
// the session regardless.
-const int kInitialPolicyFetchTimeoutSeconds = 10;
+const int kInitialPolicyFetchTimeoutSeconds = 60;
} // namespace
@@ -142,11 +142,12 @@ scoped_ptr<UserCloudPolicyManagerChromeOS>
policy::BrowserPolicyConnectorChromeOS* connector =
g_browser_process->platform_part()->browser_policy_connector_chromeos();
UserAffiliation affiliation = connector->GetUserAffiliation(username);
- const bool is_managed_user = affiliation == USER_AFFILIATION_MANAGED;
+ const bool is_first_login = user_manager->IsCurrentUserNew();
const bool is_browser_restart =
command_line->HasSwitch(chromeos::switches::kLoginUser) &&
!command_line->HasSwitch(chromeos::switches::kLoginPassword);
- const bool wait_for_initial_policy = is_managed_user && !is_browser_restart;
+ const bool wait_for_initial_policy = is_first_login && !is_browser_restart;
+ DCHECK(!BrowserPolicyConnector::IsNonEnterpriseUser(username));
bartfab (slow) 2014/06/16 09:37:27 Nit: Instead of a DCHECK here, better add a commen
Andrew T Wilson (Slow) 2014/06/16 12:34:58 +1 to this. I didn't understand this check either.
DeviceManagementService* device_management_service =
connector->device_management_service();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698