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

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

Issue 335833003: Rename "managed (mode|user)" to "supervised user" (part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments (+ a few other cleanups) Created 6 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_IMPORT_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_IMPORT_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_IMPORT_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_IMPORT_HANDLER_H_
7 7
8 #include "base/callback_list.h" 8 #include "base/callback_list.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/scoped_observer.h" 10 #include "base/scoped_observer.h"
11 #include "chrome/browser/managed_mode/managed_user_sync_service_observer.h" 11 #include "chrome/browser/supervised_user/supervised_user_sync_service_observer.h "
12 #include "chrome/browser/ui/webui/options/options_ui.h" 12 #include "chrome/browser/ui/webui/options/options_ui.h"
13 #include "components/signin/core/browser/signin_error_controller.h" 13 #include "components/signin/core/browser/signin_error_controller.h"
14 14
15 namespace base { 15 namespace base {
16 class DictionaryValue; 16 class DictionaryValue;
17 class ListValue; 17 class ListValue;
18 } 18 }
19 19
20 namespace options { 20 namespace options {
21 21
22 // Handler for the 'import existing managed user' dialog. 22 // Handler for the 'import existing managed user' dialog.
23 class ManagedUserImportHandler : public OptionsPageUIHandler, 23 class ManagedUserImportHandler : public OptionsPageUIHandler,
24 public ManagedUserSyncServiceObserver, 24 public SupervisedUserSyncServiceObserver,
25 public SigninErrorController::Observer { 25 public SigninErrorController::Observer {
26 public: 26 public:
27 typedef base::CallbackList<void(const std::string&, const std::string&)> 27 typedef base::CallbackList<void(const std::string&, const std::string&)>
28 CallbackList; 28 CallbackList;
29 29
30 ManagedUserImportHandler(); 30 ManagedUserImportHandler();
31 virtual ~ManagedUserImportHandler(); 31 virtual ~ManagedUserImportHandler();
32 32
33 // OptionsPageUIHandler implementation. 33 // OptionsPageUIHandler implementation.
34 virtual void GetLocalizedValues( 34 virtual void GetLocalizedValues(
35 base::DictionaryValue* localized_strings) OVERRIDE; 35 base::DictionaryValue* localized_strings) OVERRIDE;
36 virtual void InitializeHandler() OVERRIDE; 36 virtual void InitializeHandler() OVERRIDE;
37 37
38 // WebUIMessageHandler implementation. 38 // WebUIMessageHandler implementation.
39 virtual void RegisterMessages() OVERRIDE; 39 virtual void RegisterMessages() OVERRIDE;
40 40
41 // ManagedUserSyncServiceObserver implementation. 41 // SupervisedUserSyncServiceObserver implementation.
42 virtual void OnManagedUserAcknowledged(const std::string& managed_user_id) 42 virtual void OnSupervisedUserAcknowledged(
43 OVERRIDE {} 43 const std::string& supervised_user_id) OVERRIDE {}
44 virtual void OnManagedUsersSyncingStopped() OVERRIDE {} 44 virtual void OnSupervisedUsersSyncingStopped() OVERRIDE {}
45 virtual void OnManagedUsersChanged() OVERRIDE; 45 virtual void OnSupervisedUsersChanged() OVERRIDE;
46 46
47 // SigninErrorController::Observer implementation. 47 // SigninErrorController::Observer implementation.
48 virtual void OnErrorChanged() OVERRIDE; 48 virtual void OnErrorChanged() OVERRIDE;
49 49
50 private: 50 private:
51 // Clears the cached list of managed users and fetches the new list of managed 51 // Clears the cached list of managed users and fetches the new list of managed
52 // users. 52 // users.
53 void FetchManagedUsers(); 53 void FetchManagedUsers();
54 54
55 // Callback for the "requestManagedUserImportUpdate" message. 55 // Callback for the "requestManagedUserImportUpdate" message.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 ScopedObserver<SigninErrorController, ManagedUserImportHandler> observer_; 87 ScopedObserver<SigninErrorController, ManagedUserImportHandler> observer_;
88 88
89 base::WeakPtrFactory<ManagedUserImportHandler> weak_ptr_factory_; 89 base::WeakPtrFactory<ManagedUserImportHandler> weak_ptr_factory_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(ManagedUserImportHandler); 91 DISALLOW_COPY_AND_ASSIGN(ManagedUserImportHandler);
92 }; 92 };
93 93
94 } // namespace options 94 } // namespace options
95 95
96 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_IMPORT_HANDLER_H_ 96 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGED_USER_IMPORT_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698