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

Issue 13119011: Enable WebContents elevation for managed users. (Closed)

Created:
7 years, 8 months ago by Adrian Kuegel
Modified:
7 years, 8 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, Aaron Boodman, pam+watch_chromium.org, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Enable the new elevation for managed users which is tied to a specific WebContents. This replaces the old elevation which was tied to a profile. BUG=222364 TEST=unit_tests,browser_tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=192549

Patch Set 1 : Enable the tab elevation for managed users. #

Total comments: 6

Patch Set 2 : Address review comments. #

Total comments: 3

Patch Set 3 : Put ScopedExtensionElevation in its own file. #

Total comments: 6

Patch Set 4 : Add a NULL-ptr check. #

Patch Set 5 : Address review comments. #

Total comments: 2

Patch Set 6 : Address review comment. #

Total comments: 4

Patch Set 7 : Refactor duplicate code into GetScopedElevation function. #

Total comments: 6

Patch Set 8 : Use const reference to string parameter. #

Patch Set 9 : Rebase to ToT. #

Patch Set 10 : Check if web_ui() is NULL. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -91 lines) Patch
M chrome/browser/extensions/extension_uninstall_dialog.cc View 1 2 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/managed_mode/managed_user_service.h View 4 chunks +0 lines, -22 lines 0 comments Download
M chrome/browser/managed_mode/managed_user_service.cc View 1 2 3 8 chunks +17 lines, -34 lines 0 comments Download
M chrome/browser/managed_mode/managed_user_service_unittest.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
A chrome/browser/managed_mode/scoped_extension_elevation.h View 1 2 3 4 1 chunk +35 lines, -0 lines 0 comments Download
A chrome/browser/managed_mode/scoped_extension_elevation.cc View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/extensions/extension_settings_handler.h View 1 2 3 4 5 6 7 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/extensions/extension_settings_handler.cc View 1 2 3 4 5 6 7 8 9 9 chunks +45 lines, -9 lines 0 comments Download
M chrome/browser/ui/webui/history_ui.cc View 1 2 3 4 5 6 4 chunks +12 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/options/managed_user_passphrase_handler.cc View 4 chunks +7 lines, -8 lines 0 comments Download
M chrome/browser/ui/webui/options/managed_user_settings_handler.cc View 1 2 chunks +22 lines, -8 lines 0 comments Download
M chrome/browser/ui/webui/options/managed_user_settings_test.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
Adrian Kuegel
Bernhard, can you please review this changelist?
7 years, 8 months ago (2013-03-27 15:21:25 UTC) #1
Bernhard Bauer
https://codereview.chromium.org/13119011/diff/2001/chrome/browser/extensions/extension_uninstall_dialog.cc File chrome/browser/extensions/extension_uninstall_dialog.cc (right): https://codereview.chromium.org/13119011/diff/2001/chrome/browser/extensions/extension_uninstall_dialog.cc#newcode28 chrome/browser/extensions/extension_uninstall_dialog.cc:28: #include "chrome/browser/ui/tabs/tab_strip_model.h" Include this unconditionally. https://codereview.chromium.org/13119011/diff/2001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc File chrome/browser/ui/webui/extensions/extension_settings_handler.cc (right): ...
7 years, 8 months ago (2013-03-27 15:48:14 UTC) #2
Adrian Kuegel
I uploaded a new patch. I added the ScopedExtensionElevation class in an anonymous namespace, since ...
7 years, 8 months ago (2013-03-27 16:17:43 UTC) #3
Bernhard Bauer
On 2013/03/27 16:17:43, Adrian Kuegel wrote: > I uploaded a new patch. I added the ...
7 years, 8 months ago (2013-03-27 16:23:13 UTC) #4
Adrian Kuegel
Ok, I extracted the new class in its own file, now it could be used ...
7 years, 8 months ago (2013-03-27 16:52:25 UTC) #5
Adrian Kuegel
I added a check in the IsElevatedForWebContents method if the ManagedModeNavigationObserver is NULL. In the ...
7 years, 8 months ago (2013-03-28 15:29:11 UTC) #6
Bernhard Bauer
On 2013/03/28 15:29:11, Adrian Kuegel wrote: > I added a check in the IsElevatedForWebContents method ...
7 years, 8 months ago (2013-03-28 15:48:40 UTC) #7
Adrian Kuegel
On 2013/03/28 15:48:40, Bernhard Bauer wrote: > Do we even expect to call this on ...
7 years, 8 months ago (2013-03-28 15:51:49 UTC) #8
Bernhard Bauer
https://codereview.chromium.org/13119011/diff/10017/chrome/browser/managed_mode/scoped_extension_elevation.h File chrome/browser/managed_mode/scoped_extension_elevation.h (right): https://codereview.chromium.org/13119011/diff/10017/chrome/browser/managed_mode/scoped_extension_elevation.h#newcode21 chrome/browser/managed_mode/scoped_extension_elevation.h:21: void AddExtension(std::string extension_id); Pass |extension_id| by const reference. https://codereview.chromium.org/13119011/diff/10017/chrome/browser/managed_mode/scoped_extension_elevation.h#newcode25 ...
7 years, 8 months ago (2013-03-28 15:52:01 UTC) #9
Adrian Kuegel
https://codereview.chromium.org/13119011/diff/10017/chrome/browser/managed_mode/scoped_extension_elevation.h File chrome/browser/managed_mode/scoped_extension_elevation.h (right): https://codereview.chromium.org/13119011/diff/10017/chrome/browser/managed_mode/scoped_extension_elevation.h#newcode21 chrome/browser/managed_mode/scoped_extension_elevation.h:21: void AddExtension(std::string extension_id); On 2013/03/28 15:52:01, Bernhard Bauer wrote: ...
7 years, 8 months ago (2013-03-28 16:05:53 UTC) #10
Bernhard Bauer
https://codereview.chromium.org/13119011/diff/26001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc File chrome/browser/ui/webui/extensions/extension_settings_handler.cc (right): https://codereview.chromium.org/13119011/diff/26001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc#newcode589 chrome/browser/ui/webui/extensions/extension_settings_handler.cc:589: scoped_ptr<ScopedExtensionElevation> elevation( Aaand now you can stack-allocate it.
7 years, 8 months ago (2013-03-28 16:09:59 UTC) #11
Adrian Kuegel
https://codereview.chromium.org/13119011/diff/26001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc File chrome/browser/ui/webui/extensions/extension_settings_handler.cc (right): https://codereview.chromium.org/13119011/diff/26001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc#newcode589 chrome/browser/ui/webui/extensions/extension_settings_handler.cc:589: scoped_ptr<ScopedExtensionElevation> elevation( On 2013/03/28 16:09:59, Bernhard Bauer wrote: > ...
7 years, 8 months ago (2013-03-28 16:16:12 UTC) #12
Bernhard Bauer
lgtm
7 years, 8 months ago (2013-04-02 11:35:51 UTC) #13
Adrian Kuegel
@Benjamin: Can you please review my changes to the file chrome/browser/extensions/extension_uninstall_dialog.cc, and the files in ...
7 years, 8 months ago (2013-04-02 12:25:04 UTC) #14
James Hawkins
https://codereview.chromium.org/13119011/diff/33001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc File chrome/browser/ui/webui/extensions/extension_settings_handler.cc (right): https://codereview.chromium.org/13119011/diff/33001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc#newcode788 chrome/browser/ui/webui/extensions/extension_settings_handler.cc:788: ManagedUserService* service = ManagedUserServiceFactory::GetForProfile( This looks identical to the ...
7 years, 8 months ago (2013-04-02 16:03:39 UTC) #15
Adrian Kuegel
https://codereview.chromium.org/13119011/diff/33001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc File chrome/browser/ui/webui/extensions/extension_settings_handler.cc (right): https://codereview.chromium.org/13119011/diff/33001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc#newcode788 chrome/browser/ui/webui/extensions/extension_settings_handler.cc:788: ManagedUserService* service = ManagedUserServiceFactory::GetForProfile( On 2013/04/02 16:03:39, James Hawkins ...
7 years, 8 months ago (2013-04-02 16:44:29 UTC) #16
James Hawkins
https://codereview.chromium.org/13119011/diff/41001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc File chrome/browser/ui/webui/extensions/extension_settings_handler.cc (right): https://codereview.chromium.org/13119011/diff/41001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc#newcode599 chrome/browser/ui/webui/extensions/extension_settings_handler.cc:599: scoped_ptr<ScopedExtensionElevation> elevation = |elevation| is unused. https://codereview.chromium.org/13119011/diff/41001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc#newcode795 chrome/browser/ui/webui/extensions/extension_settings_handler.cc:795: scoped_ptr<ScopedExtensionElevation> ...
7 years, 8 months ago (2013-04-02 16:47:46 UTC) #17
not at google - send to devlin
extensions lgtm https://codereview.chromium.org/13119011/diff/41001/chrome/browser/extensions/extension_uninstall_dialog.cc File chrome/browser/extensions/extension_uninstall_dialog.cc (right): https://codereview.chromium.org/13119011/diff/41001/chrome/browser/extensions/extension_uninstall_dialog.cc#newcode164 chrome/browser/extensions/extension_uninstall_dialog.cc:164: service->AddElevationForExtension(extension_->id()); It seems like this should be ...
7 years, 8 months ago (2013-04-02 21:55:25 UTC) #18
Adrian Kuegel
https://codereview.chromium.org/13119011/diff/41001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc File chrome/browser/ui/webui/extensions/extension_settings_handler.cc (right): https://codereview.chromium.org/13119011/diff/41001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc#newcode599 chrome/browser/ui/webui/extensions/extension_settings_handler.cc:599: scoped_ptr<ScopedExtensionElevation> elevation = It is used indirectly. ScopedExtensionElevation gives ...
7 years, 8 months ago (2013-04-03 08:30:25 UTC) #19
Bernhard Bauer
https://codereview.chromium.org/13119011/diff/41001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc File chrome/browser/ui/webui/extensions/extension_settings_handler.cc (right): https://codereview.chromium.org/13119011/diff/41001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc#newcode585 chrome/browser/ui/webui/extensions/extension_settings_handler.cc:585: ExtensionSettingsHandler::GetScopedElevation(std::string extension_id) { Pass string parameters via const ref.
7 years, 8 months ago (2013-04-03 09:00:17 UTC) #20
Adrian Kuegel
https://codereview.chromium.org/13119011/diff/41001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc File chrome/browser/ui/webui/extensions/extension_settings_handler.cc (right): https://codereview.chromium.org/13119011/diff/41001/chrome/browser/ui/webui/extensions/extension_settings_handler.cc#newcode585 chrome/browser/ui/webui/extensions/extension_settings_handler.cc:585: ExtensionSettingsHandler::GetScopedElevation(std::string extension_id) { On 2013/04/03 09:00:17, Bernhard Bauer wrote: ...
7 years, 8 months ago (2013-04-03 09:42:40 UTC) #21
Adrian Kuegel
James, could you please take another look?
7 years, 8 months ago (2013-04-04 12:21:51 UTC) #22
James Hawkins
lgtm
7 years, 8 months ago (2013-04-04 17:13:32 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akuegel@chromium.org/13119011/64001
7 years, 8 months ago (2013-04-05 07:49:35 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akuegel@chromium.org/13119011/73003
7 years, 8 months ago (2013-04-05 08:47:32 UTC) #25
commit-bot: I haz the power
7 years, 8 months ago (2013-04-05 13:04:53 UTC) #26
Message was sent while issue was closed.
Change committed as 192549

Powered by Google App Engine
This is Rietveld 408576698