| 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/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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 html_source->AddLocalizedString(version_ui::kProfilePathName, | 132 html_source->AddLocalizedString(version_ui::kProfilePathName, |
| 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 #elif defined(_MSC_VER) && _MSC_VER == 1900 |
| 143 html_source->AddString("compiler", "MSVC 2015"); |
| 144 #elif defined(_MSC_VER) && _MSC_VER == 1800 |
| 145 html_source->AddString("compiler", "MSVC 2013"); |
| 146 #elif defined(_MSC_VER) |
| 147 #error "Unsupported version of MSVC." |
| 142 #else | 148 #else |
| 143 html_source->AddString("compiler", "MSVC"); | 149 html_source->AddString("compiler", "Unknown"); |
| 144 #endif | 150 #endif |
| 145 #endif | 151 #endif // defined(OS_WIN) |
| 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 Loading... |
| 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 } |
| OLD | NEW |