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

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

Issue 9677011: [uber page] Fix setting state on mac promote button in Help/About page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: revert to original cl Created 8 years, 9 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 | « no previous file | 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 break; 312 break;
313 case VersionUpdater::PROMOTE_ENABLED: 313 case VersionUpdater::PROMOTE_ENABLED:
314 state_str = "enabled"; 314 state_str = "enabled";
315 break; 315 break;
316 case VersionUpdater::PROMOTE_DISABLED: 316 case VersionUpdater::PROMOTE_DISABLED:
317 state_str = "disabled"; 317 state_str = "disabled";
318 break; 318 break;
319 } 319 }
320 320
321 scoped_ptr<Value> state_value(Value::CreateStringValue(state_str)); 321 scoped_ptr<Value> state_value(Value::CreateStringValue(state_str));
322 web_ui()->CallJavascriptFunction("HelpPage.setPromotionState", *state_value); 322 web_ui()->CallJavascriptFunction("help.HelpPage.setPromotionState",
323 *state_value);
323 } 324 }
324 #endif // defined(OS_MACOSX) 325 #endif // defined(OS_MACOSX)
325 326
326 #if defined(OS_CHROMEOS) 327 #if defined(OS_CHROMEOS)
327 void HelpHandler::OnOSVersion(chromeos::VersionLoader::Handle handle, 328 void HelpHandler::OnOSVersion(chromeos::VersionLoader::Handle handle,
328 std::string version) { 329 std::string version) {
329 scoped_ptr<Value> version_string(Value::CreateStringValue(version)); 330 scoped_ptr<Value> version_string(Value::CreateStringValue(version));
330 web_ui()->CallJavascriptFunction("help.HelpPage.setOSVersion", 331 web_ui()->CallJavascriptFunction("help.HelpPage.setOSVersion",
331 *version_string); 332 *version_string);
332 } 333 }
333 334
334 void HelpHandler::OnOSFirmware(chromeos::VersionLoader::Handle handle, 335 void HelpHandler::OnOSFirmware(chromeos::VersionLoader::Handle handle,
335 std::string firmware) { 336 std::string firmware) {
336 scoped_ptr<Value> firmware_string(Value::CreateStringValue(firmware)); 337 scoped_ptr<Value> firmware_string(Value::CreateStringValue(firmware));
337 web_ui()->CallJavascriptFunction("help.HelpPage.setOSFirmware", 338 web_ui()->CallJavascriptFunction("help.HelpPage.setOSFirmware",
338 *firmware_string); 339 *firmware_string);
339 } 340 }
340 341
341 void HelpHandler::OnReleaseChannel(const std::string& channel) { 342 void HelpHandler::OnReleaseChannel(const std::string& channel) {
342 scoped_ptr<Value> channel_string(Value::CreateStringValue(channel)); 343 scoped_ptr<Value> channel_string(Value::CreateStringValue(channel));
343 web_ui()->CallJavascriptFunction( 344 web_ui()->CallJavascriptFunction(
344 "help.HelpPage.updateSelectedChannel", *channel_string); 345 "help.HelpPage.updateSelectedChannel", *channel_string);
345 } 346 }
346 #endif // defined(OS_CHROMEOS) 347 #endif // defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698