summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstepco@chromium.org <stepco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-30 21:35:36 +0000
committerstepco@chromium.org <stepco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-30 21:35:36 +0000
commit0e86dd3c3d2ea7c0ccd9c2471387ecfb124f0571 (patch)
tree79c88a9e57a106c98381ee7acc9d2fdf0a1fcfd6
parent54c225346d883df4fbba23fbe4f3d8736d048e07 (diff)
downloadchromium_src-0e86dd3c3d2ea7c0ccd9c2471387ecfb124f0571.zip
chromium_src-0e86dd3c3d2ea7c0ccd9c2471387ecfb124f0571.tar.gz
chromium_src-0e86dd3c3d2ea7c0ccd9c2471387ecfb124f0571.tar.bz2
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
-rw-r--r--chrome/browser/policy/cloud/cloud_policy_invalidator.cc14
-rw-r--r--components/policy/core/common/policy_switches.cc6
-rw-r--r--components/policy/core/common/policy_switches.h1
3 files changed, 1 insertions, 20 deletions
diff --git a/chrome/browser/policy/cloud/cloud_policy_invalidator.cc b/chrome/browser/policy/cloud/cloud_policy_invalidator.cc
index dc46cff..ecef924 100644
--- a/chrome/browser/policy/cloud/cloud_policy_invalidator.cc
+++ b/chrome/browser/policy/cloud/cloud_policy_invalidator.cc
@@ -5,13 +5,11 @@
#include "chrome/browser/policy/cloud/cloud_policy_invalidator.h"
#include "base/bind.h"
-#include "base/command_line.h"
#include "base/hash.h"
#include "base/location.h"
#include "base/metrics/histogram.h"
#include "base/rand_util.h"
#include "base/sequenced_task_runner.h"
-#include "base/strings/string_number_conversions.h"
#include "base/time/clock.h"
#include "base/time/time.h"
#include "base/values.h"
@@ -19,14 +17,13 @@
#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/enterprise_metrics.h"
-#include "components/policy/core/common/policy_switches.h"
#include "policy/policy_constants.h"
#include "sync/notifier/object_id_invalidation_map.h"
namespace policy {
const int CloudPolicyInvalidator::kMissingPayloadDelay = 5;
-const int CloudPolicyInvalidator::kMaxFetchDelayDefault = 120000;
+const int CloudPolicyInvalidator::kMaxFetchDelayDefault = 10000;
const int CloudPolicyInvalidator::kMaxFetchDelayMin = 1000;
const int CloudPolicyInvalidator::kMaxFetchDelayMax = 300000;
const int CloudPolicyInvalidator::kInvalidationGracePeriod = 10;
@@ -296,15 +293,6 @@ void CloudPolicyInvalidator::UpdateMaxFetchDelay(const PolicyMap& policy_map) {
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);
}
diff --git a/components/policy/core/common/policy_switches.cc b/components/policy/core/common/policy_switches.cc
index ed3a0c6..0b194bf 100644
--- a/components/policy/core/common/policy_switches.cc
+++ b/components/policy/core/common/policy_switches.cc
@@ -7,12 +7,6 @@
namespace policy {
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
// management backend.
const char kDeviceManagementUrl[] = "device-management-url";
diff --git a/components/policy/core/common/policy_switches.h b/components/policy/core/common/policy_switches.h
index 43c366c..affb09c 100644
--- a/components/policy/core/common/policy_switches.h
+++ b/components/policy/core/common/policy_switches.h
@@ -12,7 +12,6 @@
namespace policy {
namespace switches {
-POLICY_EXPORT extern const char kCloudPolicyInvalidationDelay[];
POLICY_EXPORT extern const char kDeviceManagementUrl[];
POLICY_EXPORT extern const char kEnableComponentCloudPolicy[];
POLICY_EXPORT extern const char kDisablePolicyKeyVerification[];