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

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

Issue 13119011: Enable WebContents elevation for managed users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor duplicate code into GetScopedElevation function. 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_MANAGED_MODE_SCOPED_EXTENSION_ELEVATION_H_
6 #define CHROME_BROWSER_MANAGED_MODE_SCOPED_EXTENSION_ELEVATION_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/basictypes.h"
12
13 class ManagedUserService;
14
15 // Used to allow managed users to install extensions if they are currently in
16 // elevated state.
17 class ScopedExtensionElevation {
18 public:
19 explicit ScopedExtensionElevation(ManagedUserService* service);
20 ~ScopedExtensionElevation();
21
22 // Add elevation for the extension with the id |extension_id|.
23 void AddExtension(const std::string& extension_id);
24
25 private:
26 ManagedUserService* service_;
27
28 // A list of extensions which stay elevated until the destructor of this
29 // class is called.
30 std::vector<std::string> elevated_extensions_;
31
32 DISALLOW_COPY_AND_ASSIGN(ScopedExtensionElevation);
33 };
34
35 #endif // CHROME_BROWSER_MANAGED_MODE_SCOPED_EXTENSION_ELEVATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698