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

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

Issue 21015010: Remove all traces of deprecated Get/SetReleaseTrack calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 410
411 if (!CanChangeChannel()) { 411 if (!CanChangeChannel()) {
412 LOG(WARNING) << "Non-owner tried to change release track."; 412 LOG(WARNING) << "Non-owner tried to change release track.";
413 return; 413 return;
414 } 414 }
415 415
416 base::string16 channel; 416 base::string16 channel;
417 bool is_powerwash_allowed; 417 bool is_powerwash_allowed;
418 if (!args->GetString(0, &channel) || 418 if (!args->GetString(0, &channel) ||
419 !args->GetBoolean(1, &is_powerwash_allowed)) { 419 !args->GetBoolean(1, &is_powerwash_allowed)) {
420 LOG(ERROR) << "Can't parse SetReleaseTrack() args"; 420 LOG(ERROR) << "Can't parse SetChannel() args";
421 return; 421 return;
422 } 422 }
423 423
424 version_updater_->SetChannel(UTF16ToUTF8(channel), is_powerwash_allowed); 424 version_updater_->SetChannel(UTF16ToUTF8(channel), is_powerwash_allowed);
425 if (chromeos::UserManager::Get()->IsCurrentUserOwner()) { 425 if (chromeos::UserManager::Get()->IsCurrentUserOwner()) {
426 // Check for update after switching release channel. 426 // Check for update after switching release channel.
427 version_updater_->CheckForUpdate(base::Bind(&HelpHandler::SetUpdateStatus, 427 version_updater_->CheckForUpdate(base::Bind(&HelpHandler::SetUpdateStatus,
428 base::Unretained(this))); 428 base::Unretained(this)));
429 } 429 }
430 } 430 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 567
568 // Note that this string will be internationalized. 568 // Note that this string will be internationalized.
569 string16 build_date = base::TimeFormatFriendlyDate(time); 569 string16 build_date = base::TimeFormatFriendlyDate(time);
570 g_build_date_string = Value::CreateStringValue(build_date); 570 g_build_date_string = Value::CreateStringValue(build_date);
571 } 571 }
572 572
573 web_ui()->CallJavascriptFunction("help.HelpPage.setBuildDate", 573 web_ui()->CallJavascriptFunction("help.HelpPage.setBuildDate",
574 *g_build_date_string); 574 *g_build_date_string);
575 } 575 }
576 #endif // defined(OS_CHROMEOS) 576 #endif // defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc ('k') | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698