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

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

Issue 7941008: Cosmetic cleanups in chrome/browser/policy/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload was broken? Created 9 years, 3 months 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/file_based_policy_loader.h" 5 #include "chrome/browser/policy/file_based_policy_loader.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/files/file_path_watcher.h"
8 #include "base/memory/ref_counted.h"
9 #include "base/values.h"
8 #include "content/browser/browser_thread.h" 10 #include "content/browser/browser_thread.h"
9 11
10 using ::base::files::FilePathWatcher; 12 using ::base::files::FilePathWatcher;
11 13
12 namespace { 14 namespace {
13 15
14 // Amount of time we wait for the files on disk to settle before trying to load 16 // Amount of time we wait for the files on disk to settle before trying to load
15 // them. This alleviates the problem of reading partially written files and 17 // them. This alleviates the problem of reading partially written files and
16 // makes it possible to batch quasi-simultaneous changes. 18 // makes it possible to batch quasi-simultaneous changes.
17 const int kSettleIntervalSeconds = 5; 19 const int kSettleIntervalSeconds = 5;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 base::TimeDelta age = now - last_modification_clock_; 142 base::TimeDelta age = now - last_modification_clock_;
141 if (age < settle_interval_) { 143 if (age < settle_interval_) {
142 *delay = settle_interval_ - age; 144 *delay = settle_interval_ - age;
143 return false; 145 return false;
144 } 146 }
145 147
146 return true; 148 return true;
147 } 149 }
148 150
149 } // namespace policy 151 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/file_based_policy_loader.h ('k') | chrome/browser/policy/file_based_policy_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698