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

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: Address review comments. 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 10 matching lines...) Expand all
21 ManagedUserPassphraseHandler(); 21 ManagedUserPassphraseHandler();
22 virtual ~ManagedUserPassphraseHandler(); 22 virtual ~ManagedUserPassphraseHandler();
23 23
24 // OptionsPageUIHandler implementation. 24 // OptionsPageUIHandler implementation.
25 virtual void InitializeHandler() OVERRIDE; 25 virtual void InitializeHandler() OVERRIDE;
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 // Used to set the passphrase of the manager of the managed account. The
James Hawkins 2013/02/20 17:24:56 nit: // Sets the passphrase...
Adrian Kuegel 2013/02/20 18:05:02 Done.
32 // account. The passphrase is expected as the parameter and is passed in from 32 // passphrase is expected as the parameter and is passed in from the UI.
33 // the UI.
34 void SetLocalPassphrase(const base::ListValue* args); 33 void SetLocalPassphrase(const base::ListValue* args);
35 34
35 // Displays the passphrase dialog where the manager of the managed account
36 // can enter the passphrase which allows him to modify the settings. It
37 // expects as parameter the name of the Javascript function which should be
38 // called after the passphrase has been checked.
39 void DisplayPassphraseDialog(const base::ListValue* args);
40
41 // Will be called after the user either clicked Cancel or successfully entered
James Hawkins 2013/02/20 17:24:56 nit: Document what it does, not when it's called.
Adrian Kuegel 2013/02/20 18:05:02 Done.
42 // the passphrase and clicked Unlock in the Passphrase Dialog.
43 void PassphraseDialogCallback(bool success);
44
45 // Resets the authentication state of the manager of the managed account.
46 void EndAuthentication(const base::ListValue* args);
47
48 // Checks if there is already a passphrase specified. It expects as parameter
49 // the name of the Javascript function which should be called with the results
50 // of this check.
51 void IsPassphraseSet(const base::ListValue* args);
52
53 // Resets the passphrase to the empty string.
54 void ResetPassphrase(const base::ListValue* args);
55
56 // Used to save the name of the Javascript function which should be called
James Hawkins 2013/02/20 17:24:56 nit: // The name of the...
Adrian Kuegel 2013/02/20 18:05:02 Done.
57 // after the passphrase has been checked.
58 std::string callback_function_name_;
36 base::WeakPtrFactory<ManagedUserPassphraseHandler> weak_ptr_factory_; 59 base::WeakPtrFactory<ManagedUserPassphraseHandler> weak_ptr_factory_;
37 60
38 DISALLOW_COPY_AND_ASSIGN(ManagedUserPassphraseHandler); 61 DISALLOW_COPY_AND_ASSIGN(ManagedUserPassphraseHandler);
39 }; 62 };
40 63
41 } // namespace options 64 } // namespace options
42 65
43 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_PASSPHRASE_HANDLER_H_ 66 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_PASSPHRASE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698