| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/app/google_update_client.h" | 5 #include "chrome/app/google_update_client.h" |
| 6 | 6 |
| 7 #include <shlobj.h> | 7 #include <shlobj.h> |
| 8 #include <strsafe.h> | 8 #include <strsafe.h> |
| 9 | 9 |
| 10 #include "chrome/app/client_util.h" | 10 #include "chrome/app/client_util.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 const wchar_t* client_dll) { | 110 const wchar_t* client_dll) { |
| 111 client_util::GetExecutablePath(dll_path_); | 111 client_util::GetExecutablePath(dll_path_); |
| 112 guid_.assign(client_guid); | 112 guid_.assign(client_guid); |
| 113 dll_.assign(client_dll); | 113 dll_.assign(client_dll); |
| 114 bool ret = false; | 114 bool ret = false; |
| 115 if (!guid_.empty()) { | 115 if (!guid_.empty()) { |
| 116 if (GoogleUpdateEnvQueryStr(kEnvProductVersionKey, &version_)) { | 116 if (GoogleUpdateEnvQueryStr(kEnvProductVersionKey, &version_)) { |
| 117 ret = true; | 117 ret = true; |
| 118 } else { | 118 } else { |
| 119 std::wstring key(google_update::kRegPathClients); | 119 std::wstring key(google_update::kRegPathClients); |
| 120 key.append(L"\\"); | 120 key.append(L"\\" + guid_); |
| 121 key.append(guid_); | |
| 122 if (client_util::GetChromiumVersion(dll_path_, key.c_str(), &version_)) | 121 if (client_util::GetChromiumVersion(dll_path_, key.c_str(), &version_)) |
| 123 ret = true; | 122 ret = true; |
| 124 } | 123 } |
| 125 } | 124 } |
| 126 | 125 |
| 127 if (version_) { | 126 if (version_) { |
| 128 ::StringCchCat(dll_path_, MAX_PATH, version_); | 127 ::StringCchCat(dll_path_, MAX_PATH, version_); |
| 129 } | 128 } |
| 130 return ret; | 129 return ret; |
| 131 } | 130 } |
| 132 } // namespace google_update | 131 } // namespace google_update |
| 133 | |
| OLD | NEW |