Commit 5efacc0b authored by sfeuz@chromium.org's avatar sfeuz@chromium.org

Use int64 instead of int for cloud policy infrastructure-delay.


BUG=83431


Review URL: http://codereview.chromium.org/7054022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86497 0039d316-1c4b-4281-b951-d872f2087c98
parent 215475ad
...@@ -43,7 +43,7 @@ namespace { ...@@ -43,7 +43,7 @@ namespace {
// The delay of triggering initialization of the device policy subsystem // The delay of triggering initialization of the device policy subsystem
// after the login screen is initialized. This makes sure that device policy // after the login screen is initialized. This makes sure that device policy
// network requests are made while the system is idle waiting for user input. // network requests are made while the system is idle waiting for user input.
const int kPolicyServiceInitializationDelayMilliseconds = 100; const int64 kPolicyServiceInitializationDelayMilliseconds = 100;
// Determines the hardware keyboard from the given locale code // Determines the hardware keyboard from the given locale code
// and the OEM layout information, and saves it to "Locale State". // and the OEM layout information, and saves it to "Locale State".
......
...@@ -30,7 +30,7 @@ namespace { ...@@ -30,7 +30,7 @@ namespace {
// after the user image selection screen is initialized. This makes sure that // after the user image selection screen is initialized. This makes sure that
// user policy network requests are made while the system is idle waiting for // user policy network requests are made while the system is idle waiting for
// user input. // user input.
const int kPolicyServiceInitializationDelayMilliseconds = 400; const int64 kPolicyServiceInitializationDelayMilliseconds = 400;
// Margin in pixels from the left and right borders of screen's contents. // Margin in pixels from the left and right borders of screen's contents.
const int kHorizontalMargin = 10; const int kHorizontalMargin = 10;
......
...@@ -36,7 +36,7 @@ namespace { ...@@ -36,7 +36,7 @@ namespace {
// The following constants define delays applied before the initial policy fetch // The following constants define delays applied before the initial policy fetch
// on startup. (So that displaying Chrome's GUI does not get delayed.) // on startup. (So that displaying Chrome's GUI does not get delayed.)
// Delay in milliseconds from startup. // Delay in milliseconds from startup.
const int kServiceInitializationStartupDelay = 5000; const int64 kServiceInitializationStartupDelay = 5000;
} // namespace } // namespace
...@@ -207,7 +207,7 @@ void BrowserPolicyConnector::Initialize() { ...@@ -207,7 +207,7 @@ void BrowserPolicyConnector::Initialize() {
} }
void BrowserPolicyConnector::ScheduleServiceInitialization( void BrowserPolicyConnector::ScheduleServiceInitialization(
int delay_milliseconds) { int64 delay_milliseconds) {
if (cloud_policy_subsystem_.get()) if (cloud_policy_subsystem_.get())
cloud_policy_subsystem_->ScheduleServiceInitialization(delay_milliseconds); cloud_policy_subsystem_->ScheduleServiceInitialization(delay_milliseconds);
} }
......
...@@ -71,7 +71,7 @@ class BrowserPolicyConnector { ...@@ -71,7 +71,7 @@ class BrowserPolicyConnector {
// Schedules initialization of the policy backend service, if the service is // Schedules initialization of the policy backend service, if the service is
// already constructed. // already constructed.
void ScheduleServiceInitialization(int delay_milliseconds); void ScheduleServiceInitialization(int64 delay_milliseconds);
private: private:
friend class ::TestingBrowserProcess; friend class ::TestingBrowserProcess;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
namespace { namespace {
// Default refresh rate. // Default refresh rate.
const int kDefaultPolicyRefreshRateMs = 3 * 60 * 60 * 1000; // 3 hours. const int64 kDefaultPolicyRefreshRateMs = 3 * 60 * 60 * 1000; // 3 hours.
// Refresh rate sanity interval bounds. // Refresh rate sanity interval bounds.
const int64 kPolicyRefreshRateMinMs = 30 * 60 * 1000; // 30 minutes const int64 kPolicyRefreshRateMinMs = 30 * 60 * 1000; // 30 minutes
...@@ -88,7 +88,7 @@ void CloudPolicySubsystem::OnIPAddressChanged() { ...@@ -88,7 +88,7 @@ void CloudPolicySubsystem::OnIPAddressChanged() {
void CloudPolicySubsystem::Initialize( void CloudPolicySubsystem::Initialize(
PrefService* prefs, PrefService* prefs,
int delay_milliseconds) { int64 delay_milliseconds) {
DCHECK(!prefs_); DCHECK(!prefs_);
prefs_ = prefs; prefs_ = prefs;
...@@ -178,7 +178,7 @@ void CloudPolicySubsystem::Observe(NotificationType type, ...@@ -178,7 +178,7 @@ void CloudPolicySubsystem::Observe(NotificationType type,
} }
void CloudPolicySubsystem::ScheduleServiceInitialization( void CloudPolicySubsystem::ScheduleServiceInitialization(
int delay_milliseconds) { int64 delay_milliseconds) {
if (device_management_service_.get()) if (device_management_service_.get())
device_management_service_->ScheduleInitialization(delay_milliseconds); device_management_service_->ScheduleInitialization(delay_milliseconds);
} }
......
...@@ -77,7 +77,7 @@ class CloudPolicySubsystem ...@@ -77,7 +77,7 @@ class CloudPolicySubsystem
// Initializes the subsystem.The first network request will only be made // Initializes the subsystem.The first network request will only be made
// after |delay_milliseconds|. // after |delay_milliseconds|.
void Initialize(PrefService* prefs, int delay_milliseconds); void Initialize(PrefService* prefs, int64 delay_milliseconds);
// Shuts the subsystem down. This must be called before threading and network // Shuts the subsystem down. This must be called before threading and network
// infrastructure goes away. // infrastructure goes away.
...@@ -98,7 +98,7 @@ class CloudPolicySubsystem ...@@ -98,7 +98,7 @@ class CloudPolicySubsystem
static void RegisterPrefs(PrefService* pref_service); static void RegisterPrefs(PrefService* pref_service);
// Schedule initialization of the policy backend service. // Schedule initialization of the policy backend service.
void ScheduleServiceInitialization(int delay_milliseconds); void ScheduleServiceInitialization(int64 delay_milliseconds);
private: private:
// Updates the policy controller with a new refresh rate value. // Updates the policy controller with a new refresh rate value.
......
...@@ -117,7 +117,7 @@ DeviceManagementBackend* DeviceManagementService::CreateBackend() { ...@@ -117,7 +117,7 @@ DeviceManagementBackend* DeviceManagementService::CreateBackend() {
return new DeviceManagementBackendImpl(this); return new DeviceManagementBackendImpl(this);
} }
void DeviceManagementService::ScheduleInitialization(int delay_milliseconds) { void DeviceManagementService::ScheduleInitialization(int64 delay_milliseconds) {
if (initialized_) if (initialized_)
return; return;
CancelableTask* initialization_task = method_factory_.NewRunnableMethod( CancelableTask* initialization_task = method_factory_.NewRunnableMethod(
......
...@@ -58,7 +58,7 @@ class DeviceManagementService : public URLFetcher::Delegate { ...@@ -58,7 +58,7 @@ class DeviceManagementService : public URLFetcher::Delegate {
virtual DeviceManagementBackend* CreateBackend(); virtual DeviceManagementBackend* CreateBackend();
// Schedules a task to run |Initialize| after |delay_milliseconds| had passed. // Schedules a task to run |Initialize| after |delay_milliseconds| had passed.
void ScheduleInitialization(int delay_milliseconds); void ScheduleInitialization(int64 delay_milliseconds);
// Makes the service stop all requests and drop the reference to the request // Makes the service stop all requests and drop the reference to the request
// context. // context.
......
...@@ -24,7 +24,7 @@ const FilePath::CharType kPolicyDir[] = FILE_PATH_LITERAL("Device Management"); ...@@ -24,7 +24,7 @@ const FilePath::CharType kPolicyDir[] = FILE_PATH_LITERAL("Device Management");
const FilePath::CharType kTokenCacheFile[] = FILE_PATH_LITERAL("Token"); const FilePath::CharType kTokenCacheFile[] = FILE_PATH_LITERAL("Token");
const FilePath::CharType kPolicyCacheFile[] = FILE_PATH_LITERAL("Policy"); const FilePath::CharType kPolicyCacheFile[] = FILE_PATH_LITERAL("Policy");
const int kServiceInitializationStartupDelay = 2000; const int64 kServiceInitializationStartupDelay = 2000;
} // namespace } // namespace
...@@ -64,7 +64,7 @@ ProfilePolicyConnector::~ProfilePolicyConnector() { ...@@ -64,7 +64,7 @@ ProfilePolicyConnector::~ProfilePolicyConnector() {
} }
void ProfilePolicyConnector::ScheduleServiceInitialization( void ProfilePolicyConnector::ScheduleServiceInitialization(
int delay_milliseconds) { int64 delay_milliseconds) {
if (cloud_policy_subsystem_.get()) if (cloud_policy_subsystem_.get())
cloud_policy_subsystem_->ScheduleServiceInitialization(delay_milliseconds); cloud_policy_subsystem_->ScheduleServiceInitialization(delay_milliseconds);
} }
......
...@@ -30,7 +30,7 @@ class ProfilePolicyConnector : public ProfileKeyedService { ...@@ -30,7 +30,7 @@ class ProfilePolicyConnector : public ProfileKeyedService {
// Schedules initialization of the policy backend service if the service is // Schedules initialization of the policy backend service if the service is
// already constructed. // already constructed.
void ScheduleServiceInitialization(int delay_milliseconds); void ScheduleServiceInitialization(int64 delay_milliseconds);
// Initializes the context. Should be called only after the profile's request // Initializes the context. Should be called only after the profile's request
// context is up. // context is up.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment