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 "base/file_version_info.h" | 5 #include "base/file_version_info.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 DCHECK(data_.get()); | 25 DCHECK(data_.get()); |
26 } | 26 } |
27 | 27 |
28 typedef struct { | 28 typedef struct { |
29 WORD language; | 29 WORD language; |
30 WORD code_page; | 30 WORD code_page; |
31 } LanguageAndCodePage; | 31 } LanguageAndCodePage; |
32 | 32 |
33 // static | 33 // static |
34 FileVersionInfo* FileVersionInfo::CreateFileVersionInfoForCurrentModule() { | 34 FileVersionInfo* FileVersionInfo::CreateFileVersionInfoForCurrentModule() { |
35 std::wstring app_path; | 35 FilePath app_path; |
36 if (!PathService::Get(base::FILE_MODULE, &app_path)) | 36 if (!PathService::Get(base::FILE_MODULE, &app_path)) |
37 return NULL; | 37 return NULL; |
38 | 38 |
39 return CreateFileVersionInfo(app_path); | 39 return CreateFileVersionInfo(app_path); |
40 } | 40 } |
41 | 41 |
42 // static | 42 // static |
43 FileVersionInfo* FileVersionInfo::CreateFileVersionInfo( | 43 FileVersionInfo* FileVersionInfo::CreateFileVersionInfo( |
44 const FilePath& file_path) { | 44 const FilePath& file_path) { |
45 DWORD dummy; | 45 DWORD dummy; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 return false; | 177 return false; |
178 } | 178 } |
179 | 179 |
180 std::wstring FileVersionInfo::GetStringValue(const wchar_t* name) { | 180 std::wstring FileVersionInfo::GetStringValue(const wchar_t* name) { |
181 std::wstring str; | 181 std::wstring str; |
182 if (GetValue(name, &str)) | 182 if (GetValue(name, &str)) |
183 return str; | 183 return str; |
184 else | 184 else |
185 return L""; | 185 return L""; |
186 } | 186 } |
OLD | NEW |