OLD | NEW |
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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 &tracker_); | 340 &tracker_); |
341 | 341 |
342 web_ui()->CallJavascriptFunction( | 342 web_ui()->CallJavascriptFunction( |
343 "help.HelpPage.updateEnableReleaseChannel", | 343 "help.HelpPage.updateEnableReleaseChannel", |
344 base::FundamentalValue(CanChangeChannel())); | 344 base::FundamentalValue(CanChangeChannel())); |
345 | 345 |
346 if (g_build_date_string == NULL) { | 346 if (g_build_date_string == NULL) { |
347 // If |g_build_date_string| is |NULL|, the date has not yet been assigned. | 347 // If |g_build_date_string| is |NULL|, the date has not yet been assigned. |
348 // Get the date of the last lsb-release file modification. | 348 // Get the date of the last lsb-release file modification. |
349 base::FileUtilProxy::GetFileInfo( | 349 base::FileUtilProxy::GetFileInfo( |
350 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | 350 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(), |
351 base::SysInfo::GetLsbReleaseFilePath(), | 351 base::SysInfo::GetLsbReleaseFilePath(), |
352 base::Bind(&HelpHandler::ProcessLsbFileInfo, | 352 base::Bind(&HelpHandler::ProcessLsbFileInfo, |
353 weak_factory_.GetWeakPtr())); | 353 weak_factory_.GetWeakPtr())); |
354 } else { | 354 } else { |
355 web_ui()->CallJavascriptFunction("help.HelpPage.setBuildDate", | 355 web_ui()->CallJavascriptFunction("help.HelpPage.setBuildDate", |
356 *g_build_date_string); | 356 *g_build_date_string); |
357 } | 357 } |
358 #endif // defined(OS_CHROMEOS) | 358 #endif // defined(OS_CHROMEOS) |
359 | 359 |
360 version_updater_->CheckForUpdate( | 360 version_updater_->CheckForUpdate( |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) |
OLD | NEW |