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

Side by Side Diff: chrome/browser/managed_mode/managed_user_service.h

Issue 13778004: Start in elevated mode when creating a new managed user profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nit. Created 7 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/managed_mode/managed_user_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_MANAGED_MODE_MANAGED_USER_SERVICE_H_ 5 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_
6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ 6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // install/uninstall this specific extension. 99 // install/uninstall this specific extension.
100 void AddElevationForExtension(const std::string& extension_id); 100 void AddElevationForExtension(const std::string& extension_id);
101 101
102 // Remove the elevation for a specific extension. 102 // Remove the elevation for a specific extension.
103 void RemoveElevationForExtension(const std::string& extension_id); 103 void RemoveElevationForExtension(const std::string& extension_id);
104 104
105 // Initializes this object. This method does nothing if the profile is not 105 // Initializes this object. This method does nothing if the profile is not
106 // managed. 106 // managed.
107 void Init(); 107 void Init();
108 108
109 void set_startup_elevation(bool elevation) {
110 startup_elevation_ = elevation;
111 }
112
113 bool startup_elevation() const {
114 return startup_elevation_;
115 }
116
109 // extensions::ManagementPolicy::Provider implementation: 117 // extensions::ManagementPolicy::Provider implementation:
110 virtual std::string GetDebugPolicyProviderName() const OVERRIDE; 118 virtual std::string GetDebugPolicyProviderName() const OVERRIDE;
111 virtual bool UserMayLoad(const extensions::Extension* extension, 119 virtual bool UserMayLoad(const extensions::Extension* extension,
112 string16* error) const OVERRIDE; 120 string16* error) const OVERRIDE;
113 virtual bool UserMayModifySettings(const extensions::Extension* extension, 121 virtual bool UserMayModifySettings(const extensions::Extension* extension,
114 string16* error) const OVERRIDE; 122 string16* error) const OVERRIDE;
115 123
116 // content::NotificationObserver implementation: 124 // content::NotificationObserver implementation:
117 virtual void Observe(int type, 125 virtual void Observe(int type,
118 const content::NotificationSource& source, 126 const content::NotificationSource& source,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // Updates the manual overrides for URLs in the URL filters when the 180 // Updates the manual overrides for URLs in the URL filters when the
173 // corresponding preference is changed. 181 // corresponding preference is changed.
174 void UpdateManualURLs(); 182 void UpdateManualURLs();
175 183
176 // Returns if the passphrase to authorize as the custodian is empty. 184 // Returns if the passphrase to authorize as the custodian is empty.
177 bool IsPassphraseEmpty() const; 185 bool IsPassphraseEmpty() const;
178 186
179 // Owns us via the ProfileKeyedService mechanism. 187 // Owns us via the ProfileKeyedService mechanism.
180 Profile* profile_; 188 Profile* profile_;
181 189
190 // Is true if the managed user should start in elevated mode.
191 bool startup_elevation_;
192
182 content::NotificationRegistrar registrar_; 193 content::NotificationRegistrar registrar_;
183 PrefChangeRegistrar pref_change_registrar_; 194 PrefChangeRegistrar pref_change_registrar_;
184 195
185 // Stores the extension ids of the extensions which currently can be modified 196 // Stores the extension ids of the extensions which currently can be modified
186 // by the managed user. 197 // by the managed user.
187 std::set<std::string> elevated_for_extensions_; 198 std::set<std::string> elevated_for_extensions_;
188 199
189 URLFilterContext url_filter_context_; 200 URLFilterContext url_filter_context_;
190 }; 201 };
191 202
192 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ 203 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/managed_mode/managed_user_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698