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/version_handler_chromeos.h" | 5 #include "chrome/browser/ui/webui/version_handler_chromeos.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/task_runner_util.h" | 8 #include "base/task_runner_util.h" |
9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 #include "content/public/browser/web_ui.h" | 10 #include "content/public/browser/web_ui.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 base::Bind(&chromeos::version_loader::GetARCVersion), | 32 base::Bind(&chromeos::version_loader::GetARCVersion), |
33 base::Bind(&VersionHandlerChromeOS::OnARCVersion, | 33 base::Bind(&VersionHandlerChromeOS::OnARCVersion, |
34 weak_factory_.GetWeakPtr())); | 34 weak_factory_.GetWeakPtr())); |
35 | 35 |
36 // Parent class takes care of the rest. | 36 // Parent class takes care of the rest. |
37 VersionHandler::HandleRequestVersionInfo(args); | 37 VersionHandler::HandleRequestVersionInfo(args); |
38 } | 38 } |
39 | 39 |
40 void VersionHandlerChromeOS::OnVersion(const std::string& version) { | 40 void VersionHandlerChromeOS::OnVersion(const std::string& version) { |
41 base::StringValue arg(version); | 41 base::StringValue arg(version); |
42 web_ui()->CallJavascriptFunction("returnOsVersion", arg); | 42 web_ui()->CallJavascriptFunctionUnsafe("returnOsVersion", arg); |
43 } | 43 } |
44 | 44 |
45 void VersionHandlerChromeOS::OnARCVersion(const std::string& version) { | 45 void VersionHandlerChromeOS::OnARCVersion(const std::string& version) { |
46 base::StringValue arg(version); | 46 base::StringValue arg(version); |
47 web_ui()->CallJavascriptFunction("returnARCVersion", arg); | 47 web_ui()->CallJavascriptFunctionUnsafe("returnARCVersion", arg); |
48 } | 48 } |
OLD | NEW |