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 "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/webui/version_handler.h" | 10 #include "chrome/browser/ui/webui/version_handler.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 IDS_ABOUT_VERSION_EXECUTABLE_PATH); | 115 IDS_ABOUT_VERSION_EXECUTABLE_PATH); |
116 html_source->AddString("executable_path", std::string()); | 116 html_source->AddString("executable_path", std::string()); |
117 | 117 |
118 html_source->AddLocalizedString("profile_path_name", | 118 html_source->AddLocalizedString("profile_path_name", |
119 IDS_ABOUT_VERSION_PROFILE_PATH); | 119 IDS_ABOUT_VERSION_PROFILE_PATH); |
120 html_source->AddString("profile_path", std::string()); | 120 html_source->AddString("profile_path", std::string()); |
121 | 121 |
122 html_source->AddLocalizedString("variations_name", | 122 html_source->AddLocalizedString("variations_name", |
123 IDS_ABOUT_VERSION_VARIATIONS); | 123 IDS_ABOUT_VERSION_VARIATIONS); |
124 | 124 |
| 125 #if defined(OS_WIN) |
| 126 #if defined(__clang__) |
| 127 html_source->AddString("compiler", "clang"); |
| 128 #else |
| 129 html_source->AddString("compiler", "MSVC"); |
| 130 #endif |
| 131 #endif |
| 132 |
125 html_source->SetJsonPath("strings.js"); | 133 html_source->SetJsonPath("strings.js"); |
126 html_source->AddResourcePath("version.js", IDR_ABOUT_VERSION_JS); | 134 html_source->AddResourcePath("version.js", IDR_ABOUT_VERSION_JS); |
127 html_source->AddResourcePath("about_version.css", IDR_ABOUT_VERSION_CSS); | 135 html_source->AddResourcePath("about_version.css", IDR_ABOUT_VERSION_CSS); |
128 html_source->SetDefaultResource(IDR_ABOUT_VERSION_HTML); | 136 html_source->SetDefaultResource(IDR_ABOUT_VERSION_HTML); |
129 return html_source; | 137 return html_source; |
130 } | 138 } |
131 | 139 |
132 } // namespace | 140 } // namespace |
133 | 141 |
134 VersionUI::VersionUI(content::WebUI* web_ui) | 142 VersionUI::VersionUI(content::WebUI* web_ui) |
(...skipping 10 matching lines...) Expand all Loading... |
145 // Set up the chrome://theme/ source. | 153 // Set up the chrome://theme/ source. |
146 ThemeSource* theme = new ThemeSource(profile); | 154 ThemeSource* theme = new ThemeSource(profile); |
147 content::URLDataSource::Add(profile, theme); | 155 content::URLDataSource::Add(profile, theme); |
148 #endif | 156 #endif |
149 | 157 |
150 WebUIDataSource::Add(profile, CreateVersionUIDataSource()); | 158 WebUIDataSource::Add(profile, CreateVersionUIDataSource()); |
151 } | 159 } |
152 | 160 |
153 VersionUI::~VersionUI() { | 161 VersionUI::~VersionUI() { |
154 } | 162 } |
OLD | NEW |