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

Side by Side Diff: chrome/browser/ui/webui/settings/about_handler.cc

Issue 1975003002: MD Settings: About page, implementing detailed build info. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments. Created 4 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/settings/about_handler.h" 5 #include "chrome/browser/ui/webui/settings/about_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 IDS_ABOUT_CROS_VERSION_LICENSE, 289 IDS_ABOUT_CROS_VERSION_LICENSE,
290 base::ASCIIToUTF16(chrome::kChromeUIOSCreditsURL)); 290 base::ASCIIToUTF16(chrome::kChromeUIOSCreditsURL));
291 html_source->AddString("aboutProductOsLicense", os_license); 291 html_source->AddString("aboutProductOsLicense", os_license);
292 292
293 html_source->AddBoolean("aboutCanChangeChannel", CanChangeChannel(profile)); 293 html_source->AddBoolean("aboutCanChangeChannel", CanChangeChannel(profile));
294 html_source->AddBoolean("aboutEnterpriseManaged", IsEnterpriseManaged()); 294 html_source->AddBoolean("aboutEnterpriseManaged", IsEnterpriseManaged());
295 295
296 base::Time build_time = base::SysInfo::GetLsbReleaseTime(); 296 base::Time build_time = base::SysInfo::GetLsbReleaseTime();
297 base::string16 build_date = base::TimeFormatFriendlyDate(build_time); 297 base::string16 build_date = base::TimeFormatFriendlyDate(build_time);
298 html_source->AddString("aboutBuildDate", build_date); 298 html_source->AddString("aboutBuildDate", build_date);
299
300 base::CommandLine::StringType command_line =
301 base::CommandLine::ForCurrentProcess()->GetCommandLineString();
302 html_source->AddString("aboutCommandLine", command_line);
303
304 html_source->AddString("aboutUserAgent", GetUserAgent());
305 html_source->AddString("aboutJsEngineVersion", v8::V8::GetVersion());
306 html_source->AddString("aboutBlinkVersion", content::GetWebKitVersion());
299 #endif 307 #endif
300 308
301 return new AboutHandler(); 309 return new AboutHandler();
302 } 310 }
303 311
304 void AboutHandler::RegisterMessages() { 312 void AboutHandler::RegisterMessages() {
305 web_ui()->RegisterMessageCallback( 313 web_ui()->RegisterMessageCallback(
306 "refreshUpdateStatus", 314 "refreshUpdateStatus",
307 base::Bind(&AboutHandler::HandleRefreshUpdateStatus, 315 base::Bind(&AboutHandler::HandleRefreshUpdateStatus,
308 base::Unretained(this))); 316 base::Unretained(this)));
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 std::string url = std::string("chrome://") + chrome::kChromeOSAssetHost + 641 std::string url = std::string("chrome://") + chrome::kChromeOSAssetHost +
634 "/" + path.MaybeAsASCII(); 642 "/" + path.MaybeAsASCII();
635 regulatory_info->SetString("url", url); 643 regulatory_info->SetString("url", url);
636 644
637 ResolveJavascriptCallback(base::StringValue(callback_id), *regulatory_info); 645 ResolveJavascriptCallback(base::StringValue(callback_id), *regulatory_info);
638 } 646 }
639 647
640 #endif // defined(OS_CHROMEOS) 648 #endif // defined(OS_CHROMEOS)
641 649
642 } // namespace settings 650 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698