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

Side by Side Diff: chrome/browser/ui/webui/version_ui.cc

Issue 1800773002: Output the version of MSVS in chrome://version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add error Created 4 years, 9 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 | « no previous file | no next file » | 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 "chrome/browser/ui/webui/version_ui.h" 5 #include "chrome/browser/ui/webui/version_ui.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 IDS_VERSION_UI_PROFILE_PATH); 133 IDS_VERSION_UI_PROFILE_PATH);
134 html_source->AddString(version_ui::kProfilePath, std::string()); 134 html_source->AddString(version_ui::kProfilePath, std::string());
135 135
136 html_source->AddLocalizedString(version_ui::kVariationsName, 136 html_source->AddLocalizedString(version_ui::kVariationsName,
137 IDS_VERSION_UI_VARIATIONS); 137 IDS_VERSION_UI_VARIATIONS);
138 138
139 #if defined(OS_WIN) 139 #if defined(OS_WIN)
140 #if defined(__clang__) 140 #if defined(__clang__)
141 html_source->AddString("compiler", "clang"); 141 html_source->AddString("compiler", "clang");
142 #else 142 #else
143 html_source->AddString("compiler", "MSVC"); 143 #if _MSC_VER == 1900
Dan Beam 2016/03/15 00:45:12 can this #else + #if be #elif and one less #endif?
Will Harris 2016/03/15 01:23:30 Done.
144 html_source->AddString("compiler", "MSVC 2015");
145 #elif _MSC_VER == 1800
146 html_source->AddString("compiler", "MSVC 2013");
147 #else
148 #error "Unsupported version of MSVS compiler."
149 #endif
144 #endif 150 #endif
145 #endif 151 #endif
Dan Beam 2016/03/15 00:45:12 please add #endif // defined(OS_WIN) to final #en
Dan Beam 2016/03/15 00:45:12 nit: is it possible to use mingw/g++ on windows?
Will Harris 2016/03/15 01:23:30 Done.
Will Harris 2016/03/15 01:23:30 pretty sure you can't use g++ except maybe for bas
146 152
147 html_source->SetJsonPath("strings.js"); 153 html_source->SetJsonPath("strings.js");
148 html_source->AddResourcePath(version_ui::kVersionJS, IDR_VERSION_UI_JS); 154 html_source->AddResourcePath(version_ui::kVersionJS, IDR_VERSION_UI_JS);
149 html_source->AddResourcePath(version_ui::kAboutVersionCSS, 155 html_source->AddResourcePath(version_ui::kAboutVersionCSS,
150 IDR_VERSION_UI_CSS); 156 IDR_VERSION_UI_CSS);
151 html_source->SetDefaultResource(IDR_VERSION_UI_HTML); 157 html_source->SetDefaultResource(IDR_VERSION_UI_HTML);
152 return html_source; 158 return html_source;
153 } 159 }
154 160
155 } // namespace 161 } // namespace
(...skipping 12 matching lines...) Expand all
168 // Set up the chrome://theme/ source. 174 // Set up the chrome://theme/ source.
169 ThemeSource* theme = new ThemeSource(profile); 175 ThemeSource* theme = new ThemeSource(profile);
170 content::URLDataSource::Add(profile, theme); 176 content::URLDataSource::Add(profile, theme);
171 #endif 177 #endif
172 178
173 WebUIDataSource::Add(profile, CreateVersionUIDataSource()); 179 WebUIDataSource::Add(profile, CreateVersionUIDataSource());
174 } 180 }
175 181
176 VersionUI::~VersionUI() { 182 VersionUI::~VersionUI() {
177 } 183 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698