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

Issue 4062002: Dynamic policy refresh support for the Mac. (Closed)

Created:
10 years, 2 months ago by Mattias Nissler (ping if slow)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ben+cc_chromium.org, pam+watch_chromium.org, brettw-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Dynamic policy refresh support for the Mac. Adapt the file watching code we already had for ConfigDirPolicyProvider to support a loader delegate, make the old code use it and change the Mac policy provider to watch for changes to the plist file in /Library/Managed Preferences/<username>. BUG=52040 TEST=unit tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=64415

Patch Set 1 #

Patch Set 2 : Fix compilation. #

Patch Set 3 : rebase. #

Patch Set 4 : Rebase. #

Total comments: 20

Patch Set 5 : Address comments, rework policy map handling. #

Total comments: 4

Patch Set 6 : Fix win build, address comments. #

Total comments: 4

Patch Set 7 : Static data declarations FTW! #

Total comments: 2

Patch Set 8 : s/map/list/, nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+930 lines, -656 lines) Patch
M base/mac_util.h View 2 chunks +14 lines, -0 lines 0 comments Download
M base/mac_util.mm View 2 chunks +12 lines, -2 lines 0 comments Download
M chrome/browser/policy/config_dir_policy_provider.h View 1 2 3 4 5 6 7 1 chunk +16 lines, -150 lines 0 comments Download
M chrome/browser/policy/config_dir_policy_provider.cc View 1 2 3 4 5 6 7 2 chunks +26 lines, -220 lines 0 comments Download
M chrome/browser/policy/config_dir_policy_provider_unittest.cc View 1 2 3 4 5 6 7 6 chunks +58 lines, -171 lines 0 comments Download
M chrome/browser/policy/configuration_policy_pref_store.h View 5 6 7 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/policy/configuration_policy_pref_store.cc View 5 6 7 5 chunks +32 lines, -30 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider.h View 5 6 7 3 chunks +10 lines, -15 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider.cc View 5 6 7 1 chunk +2 lines, -9 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider_mac.h View 1 2 3 4 5 6 7 1 chunk +33 lines, -12 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider_mac.cc View 1 2 3 4 5 6 7 4 chunks +61 lines, -21 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider_mac_unittest.cc View 1 2 3 4 5 6 7 4 chunks +18 lines, -9 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider_win.h View 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/configuration_policy_provider_win.cc View 5 6 7 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider_win_unittest.cc View 6 7 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/policy/dummy_configuration_policy_provider.h View 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
A chrome/browser/policy/file_based_policy_provider.h View 1 2 3 4 5 6 7 1 chunk +203 lines, -0 lines 0 comments Download
A chrome/browser/policy/file_based_policy_provider.cc View 1 2 3 4 5 6 7 1 chunk +258 lines, -0 lines 0 comments Download
A chrome/browser/policy/file_based_policy_provider_unittest.cc View 1 2 3 4 5 6 7 1 chunk +131 lines, -0 lines 0 comments Download
M chrome/browser/policy/mock_configuration_policy_provider.h View 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/preferences_mac.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/preferences_mac.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/preferences_mock_mac.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/preferences_mock_mac.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_paths.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/chrome_paths.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/common/chrome_paths_internal.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/chrome_paths_mac.mm View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Mattias Nissler (ping if slow)
Avi, can you review this? It looks a bit large, but most of it is ...
10 years, 1 month ago (2010-10-26 15:16:18 UTC) #1
Paweł Hajdan Jr.
Drive-by with some testing comments. http://codereview.chromium.org/4062002/diff/8001/9005 File chrome/browser/policy/config_dir_policy_provider_unittest.cc (right): http://codereview.chromium.org/4062002/diff/8001/9005#newcode197 chrome/browser/policy/config_dir_policy_provider_unittest.cc:197: ASSERT_TRUE(file_util::Delete(test_dir_, true)); Could you ...
10 years, 1 month ago (2010-10-26 15:56:33 UTC) #2
Avi (use Gerrit)
I really like this. LGTM
10 years, 1 month ago (2010-10-26 20:29:03 UTC) #3
danno
Drive-by review. http://codereview.chromium.org/4062002/diff/8001/9006 File chrome/browser/policy/configuration_policy_provider_mac.cc (right): http://codereview.chromium.org/4062002/diff/8001/9006#newcode34 chrome/browser/policy/configuration_policy_provider_mac.cc:34: return path.Append(base::SysCFStringRefToUTF8(bundle_id) + ".plist"); is there a ...
10 years, 1 month ago (2010-10-27 09:16:35 UTC) #4
Mattias Nissler (ping if slow)
I adressed all of your comments. Can you take another look? Note that I reworked ...
10 years, 1 month ago (2010-10-27 17:50:06 UTC) #5
Paweł Hajdan Jr.
Code I commented in the drive-by LGTM with comments. Thanks! http://codereview.chromium.org/4062002/diff/20001/21005 File chrome/browser/policy/config_dir_policy_provider_unittest.cc (right): http://codereview.chromium.org/4062002/diff/20001/21005#newcode27 ...
10 years, 1 month ago (2010-10-28 07:39:24 UTC) #6
Mattias Nissler (ping if slow)
http://codereview.chromium.org/4062002/diff/20001/21005 File chrome/browser/policy/config_dir_policy_provider_unittest.cc (right): http://codereview.chromium.org/4062002/diff/20001/21005#newcode27 chrome/browser/policy/config_dir_policy_provider_unittest.cc:27: ASSERT_TRUE(file_util::DirectoryExists(test_dir())); On 2010/10/28 07:39:24, Paweł Hajdan Jr. wrote: > ...
10 years, 1 month ago (2010-10-28 08:21:29 UTC) #7
Mattias Nissler (ping if slow)
New version that uses statically declared policy maps exclusively. Danno, how do you like this ...
10 years, 1 month ago (2010-10-28 11:57:09 UTC) #8
danno
I like this much better. Almost there, see my comments below. http://codereview.chromium.org/4062002/diff/27001/28004 File chrome/browser/policy/config_dir_policy_provider.h (right): ...
10 years, 1 month ago (2010-10-28 16:01:56 UTC) #9
Mattias Nissler (ping if slow)
Danno, how about this version? http://codereview.chromium.org/4062002/diff/27001/28004 File chrome/browser/policy/config_dir_policy_provider.h (right): http://codereview.chromium.org/4062002/diff/27001/28004#newcode33 chrome/browser/policy/config_dir_policy_provider.h:33: ConfigDirPolicyProvider(const PolicyDefinitionMap* policy_map, On ...
10 years, 1 month ago (2010-10-28 21:36:41 UTC) #10
danno
10 years, 1 month ago (2010-10-29 11:53:58 UTC) #11
LGTM.

Powered by Google App Engine
This is Rietveld 408576698