OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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/dom_ui/options/about_page_handler.h" | 5 #include "chrome/browser/dom_ui/options/about_page_handler.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // The Chromium link within the main text of the dialog. | 185 // The Chromium link within the main text of the dialog. |
186 localized_strings->SetString(chromium_url_appears_first ? | 186 localized_strings->SetString(chromium_url_appears_first ? |
187 "license_link_content_0" : "license_link_content_1", | 187 "license_link_content_0" : "license_link_content_1", |
188 WideToUTF16Hack(StringSubRange(text, | 188 WideToUTF16Hack(StringSubRange(text, |
189 text.find(kBeginLinkChr) + wcslen(kBeginLinkChr), | 189 text.find(kBeginLinkChr) + wcslen(kBeginLinkChr), |
190 text.find(kEndLinkChr)))); | 190 text.find(kEndLinkChr)))); |
191 localized_strings->SetString(chromium_url_appears_first ? | 191 localized_strings->SetString(chromium_url_appears_first ? |
192 "license_link_0" : "license_link_1", | 192 "license_link_0" : "license_link_1", |
193 l10n_util::GetStringUTF16(IDS_CHROMIUM_PROJECT_URL)); | 193 l10n_util::GetStringUTF16(IDS_CHROMIUM_PROJECT_URL)); |
194 | 194 |
195 // The Open Source link within the main text of the dialog. | 195 // The Open Source link within the main text of the dialog. We need to use |
| 196 // the chrome:// variant instead of about:credits; the latter will get |
| 197 // rewritten to about:blank. |
196 localized_strings->SetString(chromium_url_appears_first ? | 198 localized_strings->SetString(chromium_url_appears_first ? |
197 "license_link_content_1" : "license_link_content_0", | 199 "license_link_content_1" : "license_link_content_0", |
198 WideToUTF16Hack(StringSubRange(text, | 200 WideToUTF16Hack(StringSubRange(text, |
199 text.find(kBeginLinkOss) + wcslen(kBeginLinkOss), | 201 text.find(kBeginLinkOss) + wcslen(kBeginLinkOss), |
200 text.find(kEndLinkOss)))); | 202 text.find(kEndLinkOss)))); |
201 localized_strings->SetString(chromium_url_appears_first ? | 203 localized_strings->SetString(chromium_url_appears_first ? |
202 "license_link_1" : "license_link_0", chrome::kAboutCreditsURL); | 204 "license_link_1" : "license_link_0", chrome::kChromeUIAboutCreditsURL); |
203 | 205 |
204 // webkit | 206 // webkit |
205 | 207 |
206 localized_strings->SetString("webkit_version", | 208 localized_strings->SetString("webkit_version", |
207 webkit_glue::GetWebKitVersion()); | 209 webkit_glue::GetWebKitVersion()); |
208 | 210 |
209 // javascript | 211 // javascript |
210 | 212 |
211 #if defined(CHROME_V8) | 213 #if defined(CHROME_V8) |
212 localized_strings->SetString("js_engine", "V8"); | 214 localized_strings->SetString("js_engine", "V8"); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 | 394 |
393 void AboutPageHandler::OnOSVersion(chromeos::VersionLoader::Handle handle, | 395 void AboutPageHandler::OnOSVersion(chromeos::VersionLoader::Handle handle, |
394 std::string version) { | 396 std::string version) { |
395 if (version.size()) { | 397 if (version.size()) { |
396 scoped_ptr<Value> version_string(Value::CreateStringValue(version)); | 398 scoped_ptr<Value> version_string(Value::CreateStringValue(version)); |
397 dom_ui_->CallJavascriptFunction(L"AboutPage.updateOSVersionCallback", | 399 dom_ui_->CallJavascriptFunction(L"AboutPage.updateOSVersionCallback", |
398 *version_string); | 400 *version_string); |
399 } | 401 } |
400 } | 402 } |
401 #endif | 403 #endif |
OLD | NEW |