| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <shlwapi.h> | 5 #include <shlwapi.h> |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/win/registry.h" | 9 #include "base/win/registry.h" |
| 10 #include "chrome/installer/util/create_reg_key_work_item.h" | 10 #include "chrome/installer/util/create_reg_key_work_item.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 else | 27 else |
| 28 *dir = directory.value(); | 28 *dir = directory.value(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 } // namespace | 31 } // namespace |
| 32 | 32 |
| 33 CreateRegKeyWorkItem::~CreateRegKeyWorkItem() { | 33 CreateRegKeyWorkItem::~CreateRegKeyWorkItem() { |
| 34 } | 34 } |
| 35 | 35 |
| 36 CreateRegKeyWorkItem::CreateRegKeyWorkItem(HKEY predefined_root, | 36 CreateRegKeyWorkItem::CreateRegKeyWorkItem(HKEY predefined_root, |
| 37 const std::wstring& path) | 37 const std::wstring& path, |
| 38 RegWow64ViewOption reg_wow64_option) |
| 38 : predefined_root_(predefined_root), | 39 : predefined_root_(predefined_root), |
| 39 path_(path), | 40 path_(path), |
| 41 reg_wow64_option_(reg_wow64_option), |
| 40 key_created_(false) { | 42 key_created_(false) { |
| 41 } | 43 } |
| 42 | 44 |
| 43 bool CreateRegKeyWorkItem::Do() { | 45 bool CreateRegKeyWorkItem::Do() { |
| 44 if (!InitKeyList()) { | 46 if (!InitKeyList()) { |
| 45 // Nothing needs to be done here. | 47 // Nothing needs to be done here. |
| 46 VLOG(1) << "no key to create"; | 48 VLOG(1) << "no key to create"; |
| 47 return true; | 49 return true; |
| 48 } | 50 } |
| 49 | 51 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 117 |
| 116 do { | 118 do { |
| 117 key_list_.push_back(key_path); | 119 key_list_.push_back(key_path); |
| 118 // This is pure string operation so it does not matter whether the | 120 // This is pure string operation so it does not matter whether the |
| 119 // path is file path or registry path. | 121 // path is file path or registry path. |
| 120 UpOneDirectoryOrEmpty(&key_path); | 122 UpOneDirectoryOrEmpty(&key_path); |
| 121 } while (!key_path.empty()); | 123 } while (!key_path.empty()); |
| 122 | 124 |
| 123 return true; | 125 return true; |
| 124 } | 126 } |
| OLD | NEW |