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

Side by Side Diff: chrome/browser/ui/webui/options/managed_user_passphrase_handler.h

Issue 11783008: Add a lock to the managed user settings page and require authentication for unlocking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT, add test for ManagedUserSettings page. Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698