Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 // Most of this code is copied from various classes in | 5 // Most of this code is copied from various classes in |
| 6 // src/chrome/browser/policy. In particular, look at | 6 // src/chrome/browser/policy. In particular, look at |
| 7 // | 7 // |
| 8 // file_based_policy_loader.{h,cc} | 8 // file_based_policy_loader.{h,cc} |
| 9 // config_dir_policy_provider.{h,cc} | 9 // config_dir_policy_provider.{h,cc} |
| 10 // | 10 // |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 #include "base/synchronization/waitable_event.h" | 26 #include "base/synchronization/waitable_event.h" |
| 27 #include "base/time.h" | 27 #include "base/time.h" |
| 28 #include "base/values.h" | 28 #include "base/values.h" |
| 29 | 29 |
| 30 namespace remoting { | 30 namespace remoting { |
| 31 namespace policy_hack { | 31 namespace policy_hack { |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| 35 const FilePath::CharType kPolicyDir[] = | 35 const FilePath::CharType kPolicyDir[] = |
| 36 #if defined(OFFICIAL_BUILD) | |
| 36 FILE_PATH_LITERAL("/etc/opt/chrome/policies/managed"); | 37 FILE_PATH_LITERAL("/etc/opt/chrome/policies/managed"); |
| 38 #else | |
| 39 FILE_PATH_LITERAL("/etc/chromium/policies/managed"); | |
|
Sergey Ulanov
2012/08/24 19:43:33
Was it intentional change?
We always want to look
garykac
2012/08/27 22:34:57
Ah. I didn't realize that (and it's easier to edit
| |
| 40 #endif | |
| 37 | 41 |
| 38 // Amount of time we wait for the files on disk to settle before trying to load | 42 // Amount of time we wait for the files on disk to settle before trying to load |
| 39 // them. This alleviates the problem of reading partially written files and | 43 // them. This alleviates the problem of reading partially written files and |
| 40 // makes it possible to batch quasi-simultaneous changes. | 44 // makes it possible to batch quasi-simultaneous changes. |
| 41 const int kSettleIntervalSeconds = 5; | 45 const int kSettleIntervalSeconds = 5; |
| 42 | 46 |
| 43 } // namespace | 47 } // namespace |
| 44 | 48 |
| 45 class PolicyWatcherLinux : public PolicyWatcher { | 49 class PolicyWatcherLinux : public PolicyWatcher { |
| 46 public: | 50 public: |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 269 }; | 273 }; |
| 270 | 274 |
| 271 PolicyWatcher* PolicyWatcher::Create( | 275 PolicyWatcher* PolicyWatcher::Create( |
| 272 scoped_refptr<base::SingleThreadTaskRunner> task_runner) { | 276 scoped_refptr<base::SingleThreadTaskRunner> task_runner) { |
| 273 FilePath policy_dir(kPolicyDir); | 277 FilePath policy_dir(kPolicyDir); |
| 274 return new PolicyWatcherLinux(task_runner, policy_dir); | 278 return new PolicyWatcherLinux(task_runner, policy_dir); |
| 275 } | 279 } |
| 276 | 280 |
| 277 } // namespace policy_hack | 281 } // namespace policy_hack |
| 278 } // namespace remoting | 282 } // namespace remoting |
| OLD | NEW |