OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/installer/setup/user_hive_visitor.h" | 5 #include "chrome/installer/setup/user_hive_visitor.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/callback_helpers.h" | 12 #include "base/callback_helpers.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/rand_util.h" | 16 #include "base/rand_util.h" |
17 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
18 #include "base/strings/string_piece.h" | 18 #include "base/strings/string_piece.h" |
19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
20 #include "base/win/registry.h" | 20 #include "base/win/registry.h" |
21 #include "chrome/installer/setup/setup_util.h" | 21 #include "chrome/installer/util/scoped_token_privilege.h" |
22 #include "components/base32/base32.h" | 22 #include "components/base32/base32.h" |
23 | 23 |
24 namespace installer { | 24 namespace installer { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 // A helper for loading and opening a hive into a random subkey of | 28 // A helper for loading and opening a hive into a random subkey of |
29 // HKEY_LOCAL_MACHINE. | 29 // HKEY_LOCAL_MACHINE. |
30 class ScopedUserHive { | 30 class ScopedUserHive { |
31 public: | 31 public: |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 ScopedUserHive user_hive(hive_file); | 159 ScopedUserHive user_hive(hive_file); |
160 if (user_hive.valid()) { | 160 if (user_hive.valid()) { |
161 VLOG(1) << "Loaded and opened hive for sid \"" << sid << "\""; | 161 VLOG(1) << "Loaded and opened hive for sid \"" << sid << "\""; |
162 if (!visitor.Run(sid, user_hive.key())) | 162 if (!visitor.Run(sid, user_hive.key())) |
163 break; | 163 break; |
164 } | 164 } |
165 } | 165 } |
166 } | 166 } |
167 | 167 |
168 } // namespace installer | 168 } // namespace installer |
OLD | NEW |