OLD | NEW |
---|---|
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/i18n/message_formatter.h" | 8 #include "base/i18n/message_formatter.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 IDS_VERSION_UI_PROFILE_PATH); | 131 IDS_VERSION_UI_PROFILE_PATH); |
132 html_source->AddString(version_ui::kProfilePath, std::string()); | 132 html_source->AddString(version_ui::kProfilePath, std::string()); |
133 | 133 |
134 html_source->AddLocalizedString(version_ui::kVariationsName, | 134 html_source->AddLocalizedString(version_ui::kVariationsName, |
135 IDS_VERSION_UI_VARIATIONS); | 135 IDS_VERSION_UI_VARIATIONS); |
136 | 136 |
137 #if defined(OS_WIN) | 137 #if defined(OS_WIN) |
138 #if defined(__clang__) | 138 #if defined(__clang__) |
139 html_source->AddString("compiler", "clang"); | 139 html_source->AddString("compiler", "clang"); |
140 #elif defined(_MSC_VER) && _MSC_VER == 1900 | 140 #elif defined(_MSC_VER) && _MSC_VER == 1900 |
141 #if BUILDFLAG(PGO_BUILD) | |
142 html_source->AddString("compiler", "MSVC 2015 (PGO)"); | |
143 #else | |
141 html_source->AddString("compiler", "MSVC 2015"); | 144 html_source->AddString("compiler", "MSVC 2015"); |
145 #endif | |
142 #elif defined(_MSC_VER) && _MSC_VER == 1800 | 146 #elif defined(_MSC_VER) && _MSC_VER == 1800 |
brucedawson
2016/07/15 19:43:07
Could delete this at the same time? I don't know w
Sébastien Marchand
2016/07/18 19:10:41
Yeah, make sense as we don't support VS2013 anymor
| |
143 html_source->AddString("compiler", "MSVC 2013"); | 147 html_source->AddString("compiler", "MSVC 2013"); |
144 #elif defined(_MSC_VER) | 148 #elif defined(_MSC_VER) |
145 #error "Unsupported version of MSVC." | 149 #error "Unsupported version of MSVC." |
146 #else | 150 #else |
147 html_source->AddString("compiler", "Unknown"); | 151 html_source->AddString("compiler", "Unknown"); |
148 #endif | 152 #endif |
149 #endif // defined(OS_WIN) | 153 #endif // defined(OS_WIN) |
150 | 154 |
151 html_source->SetJsonPath("strings.js"); | 155 html_source->SetJsonPath("strings.js"); |
152 html_source->AddResourcePath(version_ui::kVersionJS, IDR_VERSION_UI_JS); | 156 html_source->AddResourcePath(version_ui::kVersionJS, IDR_VERSION_UI_JS); |
(...skipping 19 matching lines...) Expand all Loading... | |
172 // Set up the chrome://theme/ source. | 176 // Set up the chrome://theme/ source. |
173 ThemeSource* theme = new ThemeSource(profile); | 177 ThemeSource* theme = new ThemeSource(profile); |
174 content::URLDataSource::Add(profile, theme); | 178 content::URLDataSource::Add(profile, theme); |
175 #endif | 179 #endif |
176 | 180 |
177 WebUIDataSource::Add(profile, CreateVersionUIDataSource()); | 181 WebUIDataSource::Add(profile, CreateVersionUIDataSource()); |
178 } | 182 } |
179 | 183 |
180 VersionUI::~VersionUI() { | 184 VersionUI::~VersionUI() { |
181 } | 185 } |
OLD | NEW |