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

Side by Side Diff: chrome/browser/ui/webui/help/help_handler.cc

Issue 9348012: Help: Fix a crash because of using only a $2 paramter in a string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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/app/google_chrome_strings.grd ('k') | no next file » | 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) 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/help/help_handler.h" 5 #include "chrome/browser/ui/webui/help/help_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 l10n_util::GetStringUTF16(resources[i].ids)); 85 l10n_util::GetStringUTF16(resources[i].ids));
86 } 86 }
87 87
88 localized_strings->SetString( 88 localized_strings->SetString(
89 "browserVersion", 89 "browserVersion",
90 l10n_util::GetStringFUTF16(IDS_ABOUT_PRODUCT_VERSION, 90 l10n_util::GetStringFUTF16(IDS_ABOUT_PRODUCT_VERSION,
91 BuildBrowserVersionString())); 91 BuildBrowserVersionString()));
92 92
93 string16 license = l10n_util::GetStringFUTF16( 93 string16 license = l10n_util::GetStringFUTF16(
94 IDS_ABOUT_VERSION_LICENSE, 94 IDS_ABOUT_VERSION_LICENSE,
95 #if !defined(OS_CHROMEOS)
95 UTF8ToUTF16(google_util::StringAppendGoogleLocaleParam( 96 UTF8ToUTF16(google_util::StringAppendGoogleLocaleParam(
96 chrome::kChromiumProjectURL)), 97 chrome::kChromiumProjectURL)),
98 #endif
97 ASCIIToUTF16(chrome::kChromeUICreditsURL)); 99 ASCIIToUTF16(chrome::kChromeUICreditsURL));
98 localized_strings->SetString("productLicense", license); 100 localized_strings->SetString("productLicense", license);
99 101
100 string16 tos = l10n_util::GetStringFUTF16( 102 string16 tos = l10n_util::GetStringFUTF16(
101 IDS_ABOUT_TERMS_OF_SERVICE, UTF8ToUTF16(chrome::kChromeUITermsURL)); 103 IDS_ABOUT_TERMS_OF_SERVICE, UTF8ToUTF16(chrome::kChromeUITermsURL));
102 localized_strings->SetString("productTOS", tos); 104 localized_strings->SetString("productTOS", tos);
103 } 105 }
104 106
105 void HelpHandler::RegisterMessages() { 107 void HelpHandler::RegisterMessages() {
106 web_ui()->RegisterMessageCallback("checkForUpdate", 108 web_ui()->RegisterMessageCallback("checkForUpdate",
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 141 }
140 142
141 scoped_ptr<Value> status_value(Value::CreateStringValue(status_str)); 143 scoped_ptr<Value> status_value(Value::CreateStringValue(status_str));
142 web_ui()->CallJavascriptFunction("HelpPage.setUpdateStatus", *status_value); 144 web_ui()->CallJavascriptFunction("HelpPage.setUpdateStatus", *status_value);
143 145
144 if (status == VersionUpdater::UPDATING) { 146 if (status == VersionUpdater::UPDATING) {
145 scoped_ptr<Value> progress_value(Value::CreateIntegerValue(progress)); 147 scoped_ptr<Value> progress_value(Value::CreateIntegerValue(progress));
146 web_ui()->CallJavascriptFunction("HelpPage.setProgress", *progress_value); 148 web_ui()->CallJavascriptFunction("HelpPage.setProgress", *progress_value);
147 } 149 }
148 } 150 }
OLDNEW
« no previous file with comments | « chrome/app/google_chrome_strings.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698