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

Side by Side Diff: chrome/app/client_util.cc

Issue 1306603003: Redefine CreateFileVersionInfoForCurrentModule() as a macro on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use a real macro Created 5 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
« no previous file with comments | « base/file_version_info.h ('k') | chrome/chrome_watcher/chrome_watcher_main.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/base_paths.h" 8 #include "base/base_paths.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 base::FilePath GetExecutableDir() { 92 base::FilePath GetExecutableDir() {
93 base::char16 path[MAX_PATH]; 93 base::char16 path[MAX_PATH];
94 ::GetModuleFileNameW(nullptr, path, MAX_PATH); 94 ::GetModuleFileNameW(nullptr, path, MAX_PATH);
95 return base::FilePath(path).DirName(); 95 return base::FilePath(path).DirName();
96 } 96 }
97 97
98 } // namespace 98 } // namespace
99 99
100 base::string16 GetCurrentModuleVersion() { 100 base::string16 GetCurrentModuleVersion() {
101 scoped_ptr<FileVersionInfo> file_version_info( 101 scoped_ptr<FileVersionInfo> file_version_info(
102 FileVersionInfo::CreateFileVersionInfoForCurrentModule()); 102 CREATE_FILE_VERSION_INFO_FOR_CURRENT_MODULE());
103 if (file_version_info.get()) { 103 if (file_version_info.get()) {
104 base::string16 version_string(file_version_info->file_version()); 104 base::string16 version_string(file_version_info->file_version());
105 if (Version(base::UTF16ToASCII(version_string)).IsValid()) 105 if (Version(base::UTF16ToASCII(version_string)).IsValid())
106 return version_string; 106 return version_string;
107 } 107 }
108 return base::string16(); 108 return base::string16();
109 } 109 }
110 110
111 //============================================================================= 111 //=============================================================================
112 112
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 } 366 }
367 }; 367 };
368 368
369 MainDllLoader* MakeMainDllLoader() { 369 MainDllLoader* MakeMainDllLoader() {
370 #if defined(GOOGLE_CHROME_BUILD) 370 #if defined(GOOGLE_CHROME_BUILD)
371 return new ChromeDllLoader(); 371 return new ChromeDllLoader();
372 #else 372 #else
373 return new ChromiumDllLoader(); 373 return new ChromiumDllLoader();
374 #endif 374 #endif
375 } 375 }
OLDNEW
« no previous file with comments | « base/file_version_info.h ('k') | chrome/chrome_watcher/chrome_watcher_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698