Commit 0e86dd3c authored by stepco@chromium.org's avatar stepco@chromium.org

Remove flag cloud-policy-invalidation-delay.

The cloud policy server is now controlling the amount of delay through policy, so the flag is no longer needed. This change also lowers the default amount of delay (in absence of policy) to a more reasonable value based on observations of traffic to the cloud policy server.

BUG=379010

Review URL: https://codereview.chromium.org/305073002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273913 0039d316-1c4b-4281-b951-d872f2087c98
parent 54c22534
...@@ -5,13 +5,11 @@ ...@@ -5,13 +5,11 @@
#include "chrome/browser/policy/cloud/cloud_policy_invalidator.h" #include "chrome/browser/policy/cloud/cloud_policy_invalidator.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/command_line.h"
#include "base/hash.h" #include "base/hash.h"
#include "base/location.h" #include "base/location.h"
#include "base/metrics/histogram.h" #include "base/metrics/histogram.h"
#include "base/rand_util.h" #include "base/rand_util.h"
#include "base/sequenced_task_runner.h" #include "base/sequenced_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/clock.h" #include "base/time/clock.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "base/values.h" #include "base/values.h"
...@@ -19,14 +17,13 @@ ...@@ -19,14 +17,13 @@
#include "components/policy/core/common/cloud/cloud_policy_client.h" #include "components/policy/core/common/cloud/cloud_policy_client.h"
#include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h" #include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h"
#include "components/policy/core/common/cloud/enterprise_metrics.h" #include "components/policy/core/common/cloud/enterprise_metrics.h"
#include "components/policy/core/common/policy_switches.h"
#include "policy/policy_constants.h" #include "policy/policy_constants.h"
#include "sync/notifier/object_id_invalidation_map.h" #include "sync/notifier/object_id_invalidation_map.h"
namespace policy { namespace policy {
const int CloudPolicyInvalidator::kMissingPayloadDelay = 5; const int CloudPolicyInvalidator::kMissingPayloadDelay = 5;
const int CloudPolicyInvalidator::kMaxFetchDelayDefault = 120000; const int CloudPolicyInvalidator::kMaxFetchDelayDefault = 10000;
const int CloudPolicyInvalidator::kMaxFetchDelayMin = 1000; const int CloudPolicyInvalidator::kMaxFetchDelayMin = 1000;
const int CloudPolicyInvalidator::kMaxFetchDelayMax = 300000; const int CloudPolicyInvalidator::kMaxFetchDelayMax = 300000;
const int CloudPolicyInvalidator::kInvalidationGracePeriod = 10; const int CloudPolicyInvalidator::kInvalidationGracePeriod = 10;
...@@ -296,15 +293,6 @@ void CloudPolicyInvalidator::UpdateMaxFetchDelay(const PolicyMap& policy_map) { ...@@ -296,15 +293,6 @@ void CloudPolicyInvalidator::UpdateMaxFetchDelay(const PolicyMap& policy_map) {
return; return;
} }
// Try reading the delay from the command line switch.
std::string delay_string =
CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kCloudPolicyInvalidationDelay);
if (base::StringToInt(delay_string, &delay)) {
set_max_fetch_delay(delay);
return;
}
set_max_fetch_delay(kMaxFetchDelayDefault); set_max_fetch_delay(kMaxFetchDelayDefault);
} }
......
...@@ -7,12 +7,6 @@ ...@@ -7,12 +7,6 @@
namespace policy { namespace policy {
namespace switches { namespace switches {
// The maximum amount of delay in ms between receiving a cloud policy
// invalidation and fetching the policy. A random delay up to this value is used
// to prevent Chrome clients from overwhelming the cloud policy server when a
// policy which affects many users is changed.
const char kCloudPolicyInvalidationDelay[] = "cloud-policy-invalidation-delay";
// Specifies the URL at which to fetch configuration policy from the device // Specifies the URL at which to fetch configuration policy from the device
// management backend. // management backend.
const char kDeviceManagementUrl[] = "device-management-url"; const char kDeviceManagementUrl[] = "device-management-url";
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
namespace policy { namespace policy {
namespace switches { namespace switches {
POLICY_EXPORT extern const char kCloudPolicyInvalidationDelay[];
POLICY_EXPORT extern const char kDeviceManagementUrl[]; POLICY_EXPORT extern const char kDeviceManagementUrl[];
POLICY_EXPORT extern const char kEnableComponentCloudPolicy[]; POLICY_EXPORT extern const char kEnableComponentCloudPolicy[];
POLICY_EXPORT extern const char kDisablePolicyKeyVerification[]; POLICY_EXPORT extern const char kDisablePolicyKeyVerification[];
......
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