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/chromeos/cryptohome_web_ui_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/cryptohome_web_ui_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chromeos/dbus/cryptohome_client.h" | 9 #include "chromeos/dbus/cryptohome_client.h" |
10 #include "chromeos/dbus/dbus_thread_manager.h" | 10 #include "chromeos/dbus/dbus_thread_manager.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 bool value) { | 69 bool value) { |
70 if (call_status != DBUS_METHOD_CALL_SUCCESS) | 70 if (call_status != DBUS_METHOD_CALL_SUCCESS) |
71 value = false; | 71 value = false; |
72 base::Value fundamental_value(value); | 72 base::Value fundamental_value(value); |
73 SetCryptohomeProperty(destination_id, fundamental_value); | 73 SetCryptohomeProperty(destination_id, fundamental_value); |
74 } | 74 } |
75 | 75 |
76 void CryptohomeWebUIHandler::SetCryptohomeProperty( | 76 void CryptohomeWebUIHandler::SetCryptohomeProperty( |
77 const std::string& destination_id, | 77 const std::string& destination_id, |
78 const base::Value& value) { | 78 const base::Value& value) { |
79 base::StringValue destination_id_value(destination_id); | 79 base::Value destination_id_value(destination_id); |
80 web_ui()->CallJavascriptFunctionUnsafe("SetCryptohomeProperty", | 80 web_ui()->CallJavascriptFunctionUnsafe("SetCryptohomeProperty", |
81 destination_id_value, value); | 81 destination_id_value, value); |
82 } | 82 } |
83 | 83 |
84 } // namespace chromeos | 84 } // namespace chromeos |
OLD | NEW |