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

Side by Side Diff: chrome/browser/policy/async_policy_loader.cc

Issue 78823004: Move PolicyBundle into components/policy/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on master 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/async_policy_loader.h" 5 #include "chrome/browser/policy/async_policy_loader.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/sequenced_task_runner.h" 9 #include "base/sequenced_task_runner.h"
10 #include "chrome/browser/policy/policy_bundle.h" 10 #include "components/policy/core/common/policy_bundle.h"
11 11
12 using base::Time; 12 using base::Time;
13 using base::TimeDelta; 13 using base::TimeDelta;
14 14
15 namespace policy { 15 namespace policy {
16 16
17 namespace { 17 namespace {
18 18
19 // Amount of time to wait for the files on disk to settle before trying to load 19 // Amount of time to wait for the files on disk to settle before trying to load
20 // them. This alleviates the problem of reading partially written files and 20 // them. This alleviates the problem of reading partially written files and
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 const TimeDelta age = now - last_modification_clock_; 129 const TimeDelta age = now - last_modification_clock_;
130 if (age < kSettleInterval) { 130 if (age < kSettleInterval) {
131 *delay = kSettleInterval - age; 131 *delay = kSettleInterval - age;
132 return false; 132 return false;
133 } 133 }
134 134
135 return true; 135 return true;
136 } 136 }
137 137
138 } // namespace policy 138 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698