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

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

Issue 1560027: Refactor FileVersionInfo into an interface with platform implementations. (Closed)
Patch Set: comments Created 10 years, 8 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 | « chrome/app/chrome_version_info.h ('k') | chrome/app/chrome_version_info_posix.h.version » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/app/chrome_version_info.h"
6
7 #include "base/basictypes.h"
8 #include "base/file_version_info.h"
9 #include "build/build_config.h"
10
11 #if defined(OS_POSIX) && !defined(OS_MACOSX)
12 #include "chrome/app/chrome_version_info_posix.h"
13
14 // Posix files don't have per-file version information, so we get chrome
15 // version information from chrome_version_info_posix.h, a generated header.
16 class ChromeVersionInfoPosix : public FileVersionInfo {
17 public:
18 ChromeVersionInfoPosix() {}
19
20 virtual std::wstring company_name() { return COMPANY_NAME; }
21 virtual std::wstring company_short_name() { return COMPANY_SHORT_NAME; }
22 virtual std::wstring product_name() { return PRODUCT_NAME; }
23 virtual std::wstring product_short_name() { return PRODUCT_SHORT_NAME; }
24 virtual std::wstring internal_name() { return INTERNAL_NAME; }
25 virtual std::wstring product_version() { return PRODUCT_VERSION; }
26 virtual std::wstring private_build() { return PRIVATE_BUILD; }
27 virtual std::wstring special_build() { return SPECIAL_BUILD; }
28 virtual std::wstring comments() { return COMMENTS; }
29 virtual std::wstring original_filename() { return ORIGINAL_FILENAME; }
30 virtual std::wstring file_description() { return FILE_DESCRIPTION; }
31 virtual std::wstring file_version() { return FILE_VERSION; }
32 virtual std::wstring legal_copyright() { return LEGAL_COPYRIGHT; }
33 virtual std::wstring legal_trademarks() { return LEGAL_TRADEMARKS; }
34 virtual std::wstring last_change() { return LAST_CHANGE; }
35 virtual bool is_official_build() { return OFFICIAL_BUILD; }
36
37 private:
38 DISALLOW_COPY_AND_ASSIGN(ChromeVersionInfoPosix);
39 };
40 #endif
41
42 namespace chrome_app {
43
44 FileVersionInfo* GetChromeVersionInfo() {
45 #if defined(OS_WIN) || defined(OS_MACOSX)
46 return FileVersionInfo::CreateFileVersionInfoForCurrentModule();
47 #elif defined(OS_POSIX)
48 return new ChromeVersionInfoPosix();
49 #endif
50 }
51
52 } // namespace chrome_app
OLDNEW
« no previous file with comments | « chrome/app/chrome_version_info.h ('k') | chrome/app/chrome_version_info_posix.h.version » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698