OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "components/policy/core/common/cloud/resource_cache.h" | 5 #include "components/policy/core/common/cloud/resource_cache.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/file_util.h" | |
10 #include "base/files/file_enumerator.h" | 9 #include "base/files/file_enumerator.h" |
| 10 #include "base/files/file_util.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/numerics/safe_conversions.h" | 12 #include "base/numerics/safe_conversions.h" |
13 #include "base/sequenced_task_runner.h" | 13 #include "base/sequenced_task_runner.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 | 15 |
16 namespace policy { | 16 namespace policy { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // Verifies that |value| is not empty and encodes it into base64url format, | 20 // Verifies that |value| is not empty and encodes it into base64url format, |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 if (!VerifyKeyPath(key, allow_create_key, &key_path) || | 234 if (!VerifyKeyPath(key, allow_create_key, &key_path) || |
235 !Base64UrlEncode(subkey, &encoded)) { | 235 !Base64UrlEncode(subkey, &encoded)) { |
236 return false; | 236 return false; |
237 } | 237 } |
238 *path = key_path.AppendASCII(encoded); | 238 *path = key_path.AppendASCII(encoded); |
239 return true; | 239 return true; |
240 } | 240 } |
241 | 241 |
242 | 242 |
243 } // namespace policy | 243 } // namespace policy |
OLD | NEW |