OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_PASSPHRASE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_PASSPHRASE_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_PASSPHRASE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_PASSPHRASE_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 15 matching lines...) Expand all Loading... | |
26 virtual void RegisterMessages() OVERRIDE; | 26 virtual void RegisterMessages() OVERRIDE; |
27 virtual void GetLocalizedValues( | 27 virtual void GetLocalizedValues( |
28 base::DictionaryValue* localized_strings) OVERRIDE; | 28 base::DictionaryValue* localized_strings) OVERRIDE; |
29 | 29 |
30 private: | 30 private: |
31 // This function is used to set the passphrase of the manager of the managed | 31 // This function is used to set the passphrase of the manager of the managed |
32 // account. The passphrase is expected as the parameter and is passed in from | 32 // account. The passphrase is expected as the parameter and is passed in from |
33 // the UI. | 33 // the UI. |
34 void SetLocalPassphrase(const base::ListValue* args); | 34 void SetLocalPassphrase(const base::ListValue* args); |
35 | 35 |
36 // This function displays the passphrase dialog where the manager of the | |
Pam (message me for reviews)
2013/02/15 09:31:18
Nit: For brevity, I would remove all the "This fun
Adrian Kuegel
2013/02/15 09:56:02
Done.
| |
37 // managed account can enter the passphrase which allows him to modify the | |
38 // settings. It expects as parameter the name of the Javascript function | |
39 // which should be called after the passphrase has been checked. | |
40 void DisplayPassphraseDialog(const base::ListValue* args); | |
41 | |
42 // This function will be called after the user either clicked Cancel or | |
43 // successfully entered the passphrase and clicked Unlock in the Passphrase | |
44 // Dialog. | |
45 void PassphraseDialogCallback(bool success); | |
46 | |
47 // This function resets the authentication state of the manager of the | |
48 // managed account. | |
49 void EndAuthentication(const base::ListValue* args); | |
50 | |
51 // This function checks if there is already a passphrase specified. It | |
52 // expects as parameter the name of the Javascript function which should be | |
53 // called with the results of this check. | |
54 void IsPassphraseSet(const base::ListValue* args); | |
55 | |
56 // This function resets the passphrase to the empty string. | |
57 void ResetPassphrase(const base::ListValue* args); | |
58 | |
59 // This variable is used to save the name of the Javascript function | |
60 // which should be called after the passphrase has been checked. | |
61 std::string callback_function_name_; | |
36 base::WeakPtrFactory<ManagedUserPassphraseHandler> weak_ptr_factory_; | 62 base::WeakPtrFactory<ManagedUserPassphraseHandler> weak_ptr_factory_; |
37 | 63 |
38 DISALLOW_COPY_AND_ASSIGN(ManagedUserPassphraseHandler); | 64 DISALLOW_COPY_AND_ASSIGN(ManagedUserPassphraseHandler); |
39 }; | 65 }; |
40 | 66 |
41 } // namespace options | 67 } // namespace options |
42 | 68 |
43 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_PASSPHRASE_HANDLER_H_ | 69 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_PASSPHRASE_HANDLER_H_ |
OLD | NEW |