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

Side by Side Diff: chrome/browser/policy/cloud/cloud_policy_invalidator.cc

Issue 109743002: Move policy code into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar fixes Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/policy/cloud/cloud_policy_invalidator.h" 5 #include "chrome/browser/policy/cloud/cloud_policy_invalidator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/hash.h" 9 #include "base/hash.h"
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/rand_util.h" 12 #include "base/rand_util.h"
13 #include "base/sequenced_task_runner.h" 13 #include "base/sequenced_task_runner.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "chrome/browser/invalidation/invalidation_service.h" 17 #include "chrome/browser/invalidation/invalidation_service.h"
18 #include "chrome/browser/policy/cloud/cloud_policy_client.h" 18 #include "components/policy/core/common/cloud/cloud_policy_client.h"
19 #include "chrome/browser/policy/cloud/cloud_policy_refresh_scheduler.h" 19 #include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h"
20 #include "chrome/browser/policy/cloud/enterprise_metrics.h" 20 #include "components/policy/core/common/cloud/enterprise_metrics.h"
21 #include "components/policy/core/common/policy_switches.h" 21 #include "components/policy/core/common/policy_switches.h"
22 #include "policy/policy_constants.h" 22 #include "policy/policy_constants.h"
23 #include "sync/notifier/object_id_invalidation_map.h" 23 #include "sync/notifier/object_id_invalidation_map.h"
24 24
25 namespace policy { 25 namespace policy {
26 26
27 const int CloudPolicyInvalidator::kMissingPayloadDelay = 5; 27 const int CloudPolicyInvalidator::kMissingPayloadDelay = 5;
28 const int CloudPolicyInvalidator::kMaxFetchDelayDefault = 120000; 28 const int CloudPolicyInvalidator::kMaxFetchDelayDefault = 120000;
29 const int CloudPolicyInvalidator::kMaxFetchDelayMin = 1000; 29 const int CloudPolicyInvalidator::kMaxFetchDelayMin = 1000;
30 const int CloudPolicyInvalidator::kMaxFetchDelayMax = 300000; 30 const int CloudPolicyInvalidator::kMaxFetchDelayMax = 300000;
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 if (invalidations_enabled_) 358 if (invalidations_enabled_)
359 return METRIC_POLICY_REFRESH_CHANGED; 359 return METRIC_POLICY_REFRESH_CHANGED;
360 return METRIC_POLICY_REFRESH_CHANGED_NO_INVALIDATIONS; 360 return METRIC_POLICY_REFRESH_CHANGED_NO_INVALIDATIONS;
361 } 361 }
362 if (invalid_) 362 if (invalid_)
363 return METRIC_POLICY_REFRESH_INVALIDATED_UNCHANGED; 363 return METRIC_POLICY_REFRESH_INVALIDATED_UNCHANGED;
364 return METRIC_POLICY_REFRESH_UNCHANGED; 364 return METRIC_POLICY_REFRESH_UNCHANGED;
365 } 365 }
366 366
367 } // namespace policy 367 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698