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

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

Issue 10827322: Set linux distro to CHROMEOS_RELEASE_DESCRIPTION on ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk and switch to const-ref string params in version loader callbacks Created 8 years, 4 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/ui/webui/help/help_handler.h ('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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 } 386 }
387 387
388 scoped_ptr<Value> state_value(Value::CreateStringValue(state_str)); 388 scoped_ptr<Value> state_value(Value::CreateStringValue(state_str));
389 web_ui()->CallJavascriptFunction("help.HelpPage.setPromotionState", 389 web_ui()->CallJavascriptFunction("help.HelpPage.setPromotionState",
390 *state_value); 390 *state_value);
391 } 391 }
392 #endif // defined(OS_MACOSX) 392 #endif // defined(OS_MACOSX)
393 393
394 #if defined(OS_CHROMEOS) 394 #if defined(OS_CHROMEOS)
395 void HelpHandler::OnOSVersion(chromeos::VersionLoader::Handle handle, 395 void HelpHandler::OnOSVersion(chromeos::VersionLoader::Handle handle,
396 std::string version) { 396 const std::string& version) {
397 scoped_ptr<Value> version_string(Value::CreateStringValue(version)); 397 scoped_ptr<Value> version_string(Value::CreateStringValue(version));
398 web_ui()->CallJavascriptFunction("help.HelpPage.setOSVersion", 398 web_ui()->CallJavascriptFunction("help.HelpPage.setOSVersion",
399 *version_string); 399 *version_string);
400 } 400 }
401 401
402 void HelpHandler::OnOSFirmware(chromeos::VersionLoader::Handle handle, 402 void HelpHandler::OnOSFirmware(chromeos::VersionLoader::Handle handle,
403 std::string firmware) { 403 const std::string& firmware) {
404 scoped_ptr<Value> firmware_string(Value::CreateStringValue(firmware)); 404 scoped_ptr<Value> firmware_string(Value::CreateStringValue(firmware));
405 web_ui()->CallJavascriptFunction("help.HelpPage.setOSFirmware", 405 web_ui()->CallJavascriptFunction("help.HelpPage.setOSFirmware",
406 *firmware_string); 406 *firmware_string);
407 } 407 }
408 408
409 void HelpHandler::OnReleaseChannel(const std::string& channel) { 409 void HelpHandler::OnReleaseChannel(const std::string& channel) {
410 scoped_ptr<Value> channel_string(Value::CreateStringValue(channel)); 410 scoped_ptr<Value> channel_string(Value::CreateStringValue(channel));
411 web_ui()->CallJavascriptFunction( 411 web_ui()->CallJavascriptFunction(
412 "help.HelpPage.updateSelectedChannel", *channel_string); 412 "help.HelpPage.updateSelectedChannel", *channel_string);
413 } 413 }
(...skipping 19 matching lines...) Expand all
433 433
434 // Note that this string will be internationalized. 434 // Note that this string will be internationalized.
435 string16 build_date = base::TimeFormatFriendlyDate(time); 435 string16 build_date = base::TimeFormatFriendlyDate(time);
436 g_build_date_string = Value::CreateStringValue(build_date); 436 g_build_date_string = Value::CreateStringValue(build_date);
437 } 437 }
438 438
439 web_ui()->CallJavascriptFunction("help.HelpPage.setBuildDate", 439 web_ui()->CallJavascriptFunction("help.HelpPage.setBuildDate",
440 *g_build_date_string); 440 *g_build_date_string);
441 } 441 }
442 #endif // defined(OS_CHROMEOS) 442 #endif // defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/help/help_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698