Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: base/file_version_info.cc

Issue 193047: Fix to use FilePath version of PathService::Get.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « app/resource_bundle_win.cc ('k') | base/file_version_info_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « app/resource_bundle_win.cc ('k') | base/file_version_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698