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

Unified 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: Fix problem with some WebUI tests. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/managed_user_passphrase_handler.h
diff --git a/chrome/browser/ui/webui/options/managed_user_passphrase_handler.h b/chrome/browser/ui/webui/options/managed_user_passphrase_handler.h
index 9c1a0769195c1ba202960ee06abb8763f588ee80..9b3a4444887108952cc619381ad16ce4bbfa7abb 100644
--- a/chrome/browser/ui/webui/options/managed_user_passphrase_handler.h
+++ b/chrome/browser/ui/webui/options/managed_user_passphrase_handler.h
@@ -28,11 +28,34 @@ class ManagedUserPassphraseHandler : public OptionsPageUIHandler {
base::DictionaryValue* localized_strings) OVERRIDE;
private:
- // This function is used to set the passphrase of the manager of the managed
- // account. The passphrase is expected as the parameter and is passed in from
- // the UI.
+ // Sets the passphrase of the manager of the managed account. The
+ // passphrase is expected as the parameter and is passed in from the UI.
void SetLocalPassphrase(const base::ListValue* args);
+ // Displays the passphrase dialog where the manager of the managed account
+ // can enter the passphrase which allows him to modify the settings. It
+ // expects as parameter the name of the Javascript function which should be
+ // called after the passphrase has been checked.
+ void DisplayPassphraseDialog(const base::ListValue* args);
+
+ // Calls the UI with the result of the authentication. |success| is true if
+ // the authentication was successful.
+ void PassphraseDialogCallback(bool success);
+
+ // Resets the authentication state of the manager of the managed account.
+ void EndAuthentication(const base::ListValue* args);
+
+ // Checks if there is already a passphrase specified. It expects as parameter
+ // the name of the Javascript function which should be called with the results
+ // of this check.
+ void IsPassphraseSet(const base::ListValue* args);
+
+ // Resets the passphrase to the empty string.
+ void ResetPassphrase(const base::ListValue* args);
+
+ // The name of the Javascript function which should be called after the
+ // passphrase has been checked.
+ std::string callback_function_name_;
base::WeakPtrFactory<ManagedUserPassphraseHandler> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(ManagedUserPassphraseHandler);

Powered by Google App Engine
This is Rietveld 408576698