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 <windows.h> | 5 #include <windows.h> |
6 #include <shlwapi.h> | 6 #include <shlwapi.h> |
7 | 7 |
8 #include "chrome/app/breakpad_win.h" | 8 #include "chrome/app/breakpad_win.h" |
9 #include "chrome/app/client_util.h" | 9 #include "chrome/app/client_util.h" |
10 #include "chrome/common/result_codes.h" | 10 #include "chrome/common/result_codes.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 return dll; | 132 return dll; |
133 | 133 |
134 if (!EnvQueryStr(google_update::kEnvProductVersionKey, version)) { | 134 if (!EnvQueryStr(google_update::kEnvProductVersionKey, version)) { |
135 std::wstring reg_path(GetRegistryPath()); | 135 std::wstring reg_path(GetRegistryPath()); |
136 // Look into the registry to find the latest version. | 136 // Look into the registry to find the latest version. |
137 if (!GetVersion(dir.c_str(), reg_path.c_str(), version)) | 137 if (!GetVersion(dir.c_str(), reg_path.c_str(), version)) |
138 return NULL; | 138 return NULL; |
139 } | 139 } |
140 | 140 |
141 *file = dir; | 141 *file = dir; |
142 file->append(*version); | 142 file->append(*version).append(L"\\"); |
143 return LoadChromeWithDirectory(file); | 143 return LoadChromeWithDirectory(file); |
144 } | 144 } |
145 | 145 |
146 // Launching is a matter of loading the right dll, setting the CHROME_VERSION | 146 // Launching is a matter of loading the right dll, setting the CHROME_VERSION |
147 // environment variable and just calling the entry point. Derived classes can | 147 // environment variable and just calling the entry point. Derived classes can |
148 // add custom code in the OnBeforeLaunch callback. | 148 // add custom code in the OnBeforeLaunch callback. |
149 int MainDllLoader::Launch(HINSTANCE instance, | 149 int MainDllLoader::Launch(HINSTANCE instance, |
150 sandbox::SandboxInterfaceInfo* sbox_info) { | 150 sandbox::SandboxInterfaceInfo* sbox_info) { |
151 std::wstring version; | 151 std::wstring version; |
152 std::wstring file; | 152 std::wstring file; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 } | 193 } |
194 }; | 194 }; |
195 | 195 |
196 MainDllLoader* MakeMainDllLoader() { | 196 MainDllLoader* MakeMainDllLoader() { |
197 #if defined(GOOGLE_CHROME_BUILD) | 197 #if defined(GOOGLE_CHROME_BUILD) |
198 return new ChromeDllLoader(); | 198 return new ChromeDllLoader(); |
199 #else | 199 #else |
200 return new ChromiumDllLoader(); | 200 return new ChromiumDllLoader(); |
201 #endif | 201 #endif |
202 } | 202 } |
OLD | NEW |