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

Side by Side Diff: chrome/browser/dom_ui/options/about_page_handler.cc

Issue 5315006: chromeos: Fix DOMUI about:credits link. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: abstract out AboutSource init code from WillHandleBrowserAboutURL Created 9 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/dom_ui/options/options_ui.cc » ('j') | 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) 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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/dom_ui/options/options_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698